|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.graphics.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 | |
|---|---|
Coord2D |
centerOf(GridCoordinate coord)
Returns the coordinate at the center of the GridCoordinate. |
DoubleRectangle |
extentsOf(GridCoordinate coord)
Returns the extents of the GridCoordinate's cell. |
Coord2D |
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. |
java.lang.String |
getNameTransformScript()
|
Coord2D |
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. |
java.lang.String |
getTransformScript()
|
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,
Coord2D 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. |
Coord2D |
originOf(GridCoordinate coord)
Returns the southwest corner of the given GridCoordinate's cell. |
void |
setHeight(double newHeight)
|
void |
setLevels(java.util.ArrayList newLevels)
|
void |
setNameTransformScript(java.lang.String newScript)
|
void |
setOriginX(double newOriginX)
|
void |
setOriginY(double newOriginY)
|
void |
setTransformScript(java.lang.String newScript)
|
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,
Coord2D point)
public Coord2D centerOf(GridCoordinate coord)
public DoubleRectangle extentsOf(GridCoordinate coord)
public Coord2D originOf(GridCoordinate coord)
public java.lang.String toString(GridCoordinate coord)
public 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 Coord2D getDimensions()
public Coord2D 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)
public java.lang.String getTransformScript()
public void setTransformScript(java.lang.String newScript)
public java.lang.String getNameTransformScript()
public void setNameTransformScript(java.lang.String newScript)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||