|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.AndrewGray.geoutils.MapPoint
Class defines methods to manipulate points on a true mercator map using either their x,y (mercator) coordinates or LatLong.
By adding the new MapPoint to the MercatorMap
any map resize operation will trigger the recomputation of the
MapPoint's x,y coordinates. This addition may be done at creation
time by using the ADD_TO_MAP option, or later via MercatorMap.addMapPoint(MapPoint).
This recomputation may also be performed at any time via a call to MapPoint.reset();
MercatorMap.addMapPoint(MapPoint),
MercatorMap| Field Summary | |
static int |
ADD_TO_MAP
Constructor option flag indicating that this point should be added to the MercatorMap |
static int |
NONE
Constructor option flag when no setup options are required. |
| Constructor Summary | |
MapPoint(MercatorMap mercator)
Create a new undefined MapPoint given the specified MercatorMap without adding it to the map. |
|
MapPoint(MercatorMap mercator,
int options)
Create a new undefined MapPoint given the specified MercatorMap. |
|
MapPoint(MercatorMap mercator,
LatLong ll)
Create a new MapPoint at the specified LatLong and given the specified MercatorMap. |
|
MapPoint(MercatorMap mercator,
LatLong ll,
int options)
Create a new MapPoint at the specified LatLong and given the specified MercatorMap. |
|
MapPoint(MercatorMap mercator,
java.awt.Point p)
Create a new MapPoint at the specified x,y coordinate and given the specified MercatorMap. |
|
MapPoint(MercatorMap mercator,
java.awt.Point p,
int options)
Create a new MapPoint at the specified x,y coordinate and given the specified MercatorMap. |
|
| Method Summary | |
void |
clear()
clear this MapPoint back to undefined status |
boolean |
equalTo(MapPoint p)
check whether this MapPoint represents the same point on the map as another. |
LatLong |
getLatLong()
Get the LatLong of this MapPoint |
java.lang.String |
getLatLongRawString()
return String representation of lat/long. |
java.awt.Point |
getPoint()
get the x,y coordinates of this point |
java.lang.String |
getString()
get the comment string associated with this MapPoint |
int |
getX()
Get the x coordinate of this MapPoint |
int |
getY()
Get the y coordinate of this MapPoint |
boolean |
isSet()
Check whether this MapPoint is currently set |
void |
reset()
recompute this MapPoint x,y coordinates based upon its LatLong. |
void |
set(LatLong ll)
Set this MapPoint given its LatLong |
void |
set(java.awt.Point p)
Set this MapPoint given its x,y mercator coordinates |
void |
set(java.lang.String raw)
Set this map point given the raw string as produced by getLatLongRawString. |
void |
setString(java.lang.String s)
set the comment string associated with this MapPoint |
java.lang.String |
toString()
Produce a human readable representation of this MapPoint. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ADD_TO_MAP
public static final int NONE
| Constructor Detail |
public MapPoint(MercatorMap mercator)
mercator - the MercatorMap on which to base this pointMercatorMap.addMapPoint(MapPoint)
public MapPoint(MercatorMap mercator,
int options)
mercator - the MercatorMap on which to base this pointoptions - which options should be used when creating this point.ADD_TO_MAP,
NONE
public MapPoint(MercatorMap mercator,
LatLong ll,
int options)
mercator - the MercatorMap on which to base this pointll - the LatLong to create this MapPoint at.options - which options should be used when creating this point.ADD_TO_MAP,
NONE
public MapPoint(MercatorMap mercator,
LatLong ll)
mercator - the MercatorMap on which to base this pointll - the LatLong to create this MapPoint at.
public MapPoint(MercatorMap mercator,
java.awt.Point p,
int options)
mercator - the MercatorMap on which to base this pointp - the x,y coordinates to create this MapPoint at.options - which options should be used when creating this point.ADD_TO_MAP,
NONE
public MapPoint(MercatorMap mercator,
java.awt.Point p)
mercator - the MercatorMap on which to base this pointp - the x,y coordinates to create this MapPoint at.| Method Detail |
public boolean equalTo(MapPoint p)
p - the other point to compare topublic final void set(java.awt.Point p)
p - the Point to set this MapPoint to.public final void set(LatLong ll)
ll - the LatLong to set this point to.public final void set(java.lang.String raw)
Set this map point given the raw string as produced by getLatLongRawString.
raw - the raw string as output by getLatLongRawStringjava.lang.IllegalArgumentException - if the supplied String was in the wrong formatpublic final void reset()
public final void clear()
public final boolean isSet()
public final java.awt.Point getPoint()
public final int getX()
public final int getY()
public final LatLong getLatLong()
public java.lang.String getLatLongRawString()
public final void setString(java.lang.String s)
the - new commentpublic final java.lang.String getString()
public final java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||