net.refractions.udig.mapgraphic.scalebar
Class LocationStyleContent

java.lang.Object
  extended by StyleContent
      extended by net.refractions.udig.mapgraphic.scalebar.LocationStyleContent

public class LocationStyleContent
extends StyleContent

Rectangle indicating Location in device coordinates, w & h in 1/72 of an inch.

Screen Coordinates are used. This naturally changes to Page Coordinates when printed.

The x,y position are considered in a realtive fashion.

This allows a map graphic to be specified relative to any edge.

The width and height of the Rectangle indicate the requested size in terms of Java's usual one pixel indicates 1/72 of an inch. Appropriate scaling will be needed when page output is requested.

Since:
0.6.0
Author:
Richard Gould

Field Summary
static java.lang.String ID
          extension id
static int XPAD_LEFT
           
static int XPAD_RIGHT
           
static int YPAD_BOTTOM
          padding constants
static int YPAD_TOP
           
 
Constructor Summary
LocationStyleContent()
          Location style holding a rectangle.
 
Method Summary
static java.awt.Rectangle createDefaultStyle()
          TODO summary sentence for createDefaultStyle ...
 java.lang.Object createDefaultStyle(IGeoResource resource, java.awt.Color colour, IProgressMonitor monitor)
           
 java.lang.Class getStyleClass()
           
 java.lang.Object load(IMemento memento)
           
 java.lang.Object load(java.net.URL url, IProgressMonitor monitor)
           
 void save(IMemento memento, java.lang.Object style)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
extension id

See Also:
Constant Field Values

YPAD_BOTTOM

public static final int YPAD_BOTTOM
padding constants

See Also:
Constant Field Values

YPAD_TOP

public static final int YPAD_TOP
See Also:
Constant Field Values

XPAD_LEFT

public static final int XPAD_LEFT
See Also:
Constant Field Values

XPAD_RIGHT

public static final int XPAD_RIGHT
See Also:
Constant Field Values
Constructor Detail

LocationStyleContent

public LocationStyleContent()
Location style holding a rectangle.

Method Detail

getStyleClass

public java.lang.Class getStyleClass()

load

public java.lang.Object load(IMemento memento)

save

public void save(IMemento memento,
                 java.lang.Object style)

createDefaultStyle

public java.lang.Object createDefaultStyle(IGeoResource resource,
                                           java.awt.Color colour,
                                           IProgressMonitor monitor)
                                    throws java.io.IOException
Throws:
java.io.IOException

load

public java.lang.Object load(java.net.URL url,
                             IProgressMonitor monitor)
                      throws java.io.IOException
Throws:
java.io.IOException

createDefaultStyle

public static java.awt.Rectangle createDefaultStyle()
TODO summary sentence for createDefaultStyle ...

Returns: