schmitzm.geotools.gui
Class GridPanelFormatter_LatLon1

java.lang.Object
  extended by schmitzm.geotools.gui.GridPanelFormatter
      extended by schmitzm.geotools.gui.GridPanelFormatter_LatLon1

public class GridPanelFormatter_LatLon1
extends GridPanelFormatter

This class defines a GridPanelFormatter for the WGS84 CoordinateReferenceSystem. The coordinates are formated in degrees and minutes along with the wind direction abbreviation (E/W, N/S). grid and the coordinates. * @author Martin Schmitz


Field Summary
 
Fields inherited from class schmitzm.geotools.gui.GridPanelFormatter
crs, FORMATTERS, RESOURCE
 
Constructor Summary
GridPanelFormatter_LatLon1()
          Creates a new formatter.
 
Method Summary
 double determineGridDistance(GridPanel panel, double mapMin_LL, double mapMax_LL, int panelSize)
          Determines a "fitting" fragmentation for the grid.
 String formatCoordinate(GridPanel panel, double coord)
          Formats a coordinate to degrees and minutes.
 Font getFont()
           
 String getId()
          A String ID that can be used to identify a Formatter-class.
 String getTitle()
          A human readable title
 int getWidthForVertical(GridPanel panel)
          Returns the default width for a vertical Grid
 
Methods inherited from class schmitzm.geotools.gui.GridPanelFormatter
getCRS, getFormatterByID, getHeightForHorizontal, getTooltip, setCRS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridPanelFormatter_LatLon1

public GridPanelFormatter_LatLon1()
Creates a new formatter.

Parameters:
crs - the CRS the formatter can format
Method Detail

determineGridDistance

public double determineGridDistance(GridPanel panel,
                                    double mapMin_LL,
                                    double mapMax_LL,
                                    int panelSize)
Determines a "fitting" fragmentation for the grid.

Specified by:
determineGridDistance in class GridPanelFormatter
Parameters:
mapMin_LL - minimal Lat/Lon coordinate to show in the grid
mapMax_LL - maximal Lat/Lon coordinate to show in the grid
panelSize - size of the grid panel in pixels

formatCoordinate

public String formatCoordinate(GridPanel panel,
                               double coord)
Formats a coordinate to degrees and minutes.

Specified by:
formatCoordinate in class GridPanelFormatter
Parameters:
coord - the lat/lon coordinate
gridPanel - indicates (amongst others) the grid orientation
Returns:

getFont

public Font getFont()
Overrides:
getFont in class GridPanelFormatter

getId

public String getId()
Description copied from class: GridPanelFormatter
A String ID that can be used to identify a Formatter-class. Take care, that the string is compatible with XML and doesn't containg freaky chars.

Specified by:
getId in class GridPanelFormatter

getTitle

public String getTitle()
Description copied from class: GridPanelFormatter
A human readable title

Specified by:
getTitle in class GridPanelFormatter

getWidthForVertical

public int getWidthForVertical(GridPanel panel)
Description copied from class: GridPanelFormatter
Returns the default width for a vertical Grid

Specified by:
getWidthForVertical in class GridPanelFormatter