com.partnersoft.v3x.apps.MapBrowser
Class GridMapTranslator

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.GridMapTranslator
All Implemented Interfaces:
CustomerMapLocationTranslator

public class GridMapTranslator
extends java.lang.Object
implements CustomerMapLocationTranslator

Translates map coordinates into grid system coordinates.


Constructor Summary
GridMapTranslator()
          Create a new, empty GridMapTranslator.
GridMapTranslator(GridSystem system)
          Create a GridMapTranslator for the given GridSystem.
 
Method Summary
 Coord3D coordFor(java.lang.String locationName)
          Returns the Sheet Pixel Coordinate for the center of the given customer map location.
 java.util.ArrayList getGridToScaleLevel()
           
 java.util.ArrayList getScaleToGridLevel()
           
 GridSystem getSystem()
          GridSystem used for the translation (shrug).
 java.lang.String nameFor(Coord3D coord)
          Returns the customer's map location name for the given point.
 java.lang.String nameFor(Coord3D coords, int scale)
          Returns the customer's map location name for the given coordinate at the given scale.
 int scaleFor(java.lang.String locationName)
          Returns the scale index for the given customer map location name.
 void setGridToScaleLevel(java.util.ArrayList newMapping)
           
 void setScaleToGridLevel(java.util.ArrayList newMapping)
           
 void setSystem(GridSystem newSystem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridMapTranslator

public GridMapTranslator()
Create a new, empty GridMapTranslator.


GridMapTranslator

public GridMapTranslator(GridSystem system)
Create a GridMapTranslator for the given GridSystem.

Method Detail

nameFor

public java.lang.String nameFor(Coord3D coords,
                                int scale)
Returns the customer's map location name for the given coordinate at the given scale.

Specified by:
nameFor in interface CustomerMapLocationTranslator

nameFor

public java.lang.String nameFor(Coord3D coord)
Returns the customer's map location name for the given point.

Specified by:
nameFor in interface CustomerMapLocationTranslator

coordFor

public Coord3D coordFor(java.lang.String locationName)
Returns the Sheet Pixel Coordinate for the center of the given customer map location.

Specified by:
coordFor in interface CustomerMapLocationTranslator

scaleFor

public int scaleFor(java.lang.String locationName)
Description copied from interface: CustomerMapLocationTranslator
Returns the scale index for the given customer map location name.

Specified by:
scaleFor in interface CustomerMapLocationTranslator

getSystem

public GridSystem getSystem()
GridSystem used for the translation (shrug).


setSystem

public void setSystem(GridSystem newSystem)

getScaleToGridLevel

public java.util.ArrayList getScaleToGridLevel()

setScaleToGridLevel

public void setScaleToGridLevel(java.util.ArrayList newMapping)

getGridToScaleLevel

public java.util.ArrayList getGridToScaleLevel()

setGridToScaleLevel

public void setGridToScaleLevel(java.util.ArrayList newMapping)