|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.maps.nomenclature.GridSystem
public class GridSystem
A multi-level gridded coordinate system. Defines the origin and bounds of the gridded space, * the levels of grid available and provides conversion to and from * map coordinates. These come in many varieties - grid levels use numbers or letters, come in ones or twos, start with different numbers, are variable numbers of cells wide and tall, etc. etc.
| Constructor Summary | |
|---|---|
GridSystem()
Creates a new, blank GridSystem. |
|
| Method Summary | |
|---|---|
Point |
centerOf(GridCoordinate coord)
Returns the coordinate at the center of the GridCoordinate. |
Rectangle |
extentsOf(GridCoordinate coord)
Returns the extents of the GridCoordinate's cell. |
Point |
getDimensions()
Returns the dimensions of the GridSystem. |
double |
getHeight()
Height of the entire grid system (often bigger than the extents of the client's actual map set) in map coordinates. |
java.util.ArrayList |
getLevels()
A list of the GridLevel subgriddings of the system, ordered
from coarsest to finest. |
Point |
getOrigin()
Returns the origin of the GridSystem. |
double |
getOriginX()
X coordinate of origin (SW corner) of the grid. |
double |
getOriginY()
Y coordinate of origin (SW corner) of the grid. |
Cog |
getState()
|
double |
getWidth()
Width of the entire grid system (often bigger than the extents of the client's actual map set) in map coordinates. |
GridCoordinate |
gridCoordinateContaining(int level,
Point point)
Returns the GridCoordinate containing the given point at the given level. |
GridCoordinate |
gridCoordinateNamed(java.lang.String name)
Returns the named GridCoordinate, or null if none matches. |
Point |
originOf(GridCoordinate coord)
Returns the southwest corner of the given GridCoordinate's cell. |
void |
setHeight(double newHeight)
|
void |
setLevels(java.util.ArrayList newLevels)
|
void |
setOriginX(double newOriginX)
|
void |
setOriginY(double newOriginY)
|
void |
setState(Cog newState)
|
void |
setWidth(double newWidth)
|
java.lang.String |
toString(GridCoordinate coord)
Converts a grid coordinate to a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridSystem()
| Method Detail |
|---|
public GridCoordinate gridCoordinateNamed(java.lang.String name)
public GridCoordinate gridCoordinateContaining(int level,
Point point)
public Point centerOf(GridCoordinate coord)
public Rectangle extentsOf(GridCoordinate coord)
public Point originOf(GridCoordinate coord)
public java.lang.String toString(GridCoordinate coord)
public void setState(Cog newState)
setState in interface Coggablepublic Cog getState()
getState in interface Coggablepublic java.util.ArrayList getLevels()
GridLevel subgriddings of the system, ordered
from coarsest to finest. Each successive level is a subdivision
of the previous; the top level is a subdivision of the total
extents rectangle.
public void setLevels(java.util.ArrayList newLevels)
public Point getDimensions()
public Point getOrigin()
public double getHeight()
public void setHeight(double newHeight)
public double getWidth()
public void setWidth(double newWidth)
public double getOriginX()
public void setOriginX(double newOriginX)
public double getOriginY()
public void setOriginY(double newOriginY)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||