|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.geotools.gui.GridPanelFormatter
public abstract class GridPanelFormatter
This class defines how the GridPanel
shows the coordinate grid and
the coordinates.
Field Summary | |
---|---|
protected CoordinateReferenceSystem |
crs
CRS the formatter is created for. |
static Class<? extends GridPanelFormatter>[] |
FORMATTERS
|
protected static ResourceProvider |
RESOURCE
|
Constructor Summary | |
---|---|
GridPanelFormatter(CoordinateReferenceSystem crs)
Creates a new formatter. |
Method Summary | |
---|---|
abstract double |
determineGridDistance(GridPanel panel,
double mapMinCoord,
double mapMaxCoord,
int panelSize)
Determines a "fitting" fragmentation for the grid. |
abstract String |
formatCoordinate(GridPanel panel,
double coord)
Formats a coordinate for the grid CRS. |
CoordinateReferenceSystem |
getCRS()
Returns the CRS the formatter can format. |
Font |
getFont()
|
static GridPanelFormatter |
getFormatterByID(String ID)
|
int |
getHeightForHorizontal(GridPanel panel)
Returns the default height for a horizontal Grid |
abstract String |
getId()
A String ID that can be used to identify a Formatter-class. |
abstract String |
getTitle()
A human readable title |
String |
getTooltip()
Returns a tooltip String to applied to the GridPanel s. |
abstract int |
getWidthForVertical(GridPanel panel)
Returns the default width for a vertical Grid |
void |
setCRS(CoordinateReferenceSystem crs)
Returns the CRS the formatter can format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Class<? extends GridPanelFormatter>[] FORMATTERS
protected static ResourceProvider RESOURCE
protected CoordinateReferenceSystem crs
Constructor Detail |
---|
public GridPanelFormatter(CoordinateReferenceSystem crs)
crs
- the CRS the formatter can formatMethod Detail |
---|
public static GridPanelFormatter getFormatterByID(String ID)
public abstract double determineGridDistance(GridPanel panel, double mapMinCoord, double mapMaxCoord, int panelSize)
gridPanel
- indicates (amongst others) the grid orientationmapMinCoord
- minimal coordinate to show in the grid (in the grid CRS)mapMaxCoord
- maximal coordinate to show in the grid (in the grid CRS)panelSize
- size of the grid panel in pixelspublic abstract String formatCoordinate(GridPanel panel, double coord)
coord
- the coordinategridPanel
- indicates (amongst others) the grid orientation
public CoordinateReferenceSystem getCRS()
public Font getFont()
public int getHeightForHorizontal(GridPanel panel)
public abstract String getId()
public abstract String getTitle()
public abstract int getWidthForVertical(GridPanel panel)
public void setCRS(CoordinateReferenceSystem crs)
public String getTooltip()
GridPanel
s. May be
null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |