|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.omGraphics.geom.BasicGeometry | +--com.bbn.openmap.omGraphics.OMGraphic | +--com.bbn.openmap.omGraphics.OMRect
Graphic type that lets you draw four-sided polygons that have corners that share coordinates or window points.
These assumptions are virtually the same as those on the more generic OMPoly graphic type.
OMPoly
,
Serialized FormField Summary | |
protected float |
lat1
Latitude of first corner, decimal degrees. |
protected float |
lat2
Latitude of second corner, decimal degrees. |
protected float |
lon1
Longitude of first corner, decimal degrees. |
protected float |
lon2
Longitude of second corner, decimal degrees. |
protected int |
nsegs
Number of segments to draw (used only for LINETYPE_GREATCIRCLE or LINETYPE_RHUMB lines). |
protected int |
x1
Horizontal window position of first corner, in pixels from left side of window. |
protected int |
x2
Horizontal window position of second corner, in pixels from left side of window. |
protected int |
y1
Vertical window position of first corner, in pixels from the top of the window. |
protected int |
y2
Vertical window position of second corner, in pixels from the top of the window. |
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphic |
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask |
Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible |
Constructor Summary | |
OMRect()
Default constructor, waiting to be filled. |
|
OMRect(float lt1,
float ln1,
float lt2,
float ln2,
int lType)
Create a lat/lon rectangle. |
|
OMRect(float lt1,
float ln1,
float lt2,
float ln2,
int lType,
int nsegs)
Create a lat/lon rectangle. |
|
OMRect(float lt1,
float ln1,
int px1,
int py1,
int px2,
int py2)
Construct an XY rectangle relative to a lat/lon point (RENDERTYPE_OFFSET). |
|
OMRect(int px1,
int py1,
int px2,
int py2)
Construct an XY rectangle. |
Method Summary | |
boolean |
generate(Projection proj)
Prepare the rectangle for rendering. |
int |
getBottom()
Get the bottom of XY rectangle. |
float |
getEastLon()
Get the longitude of the east edge in a LatLon rectangle. |
int |
getLeft()
Get the left of XY rectangle. |
float |
getNorthLat()
Get the latitude of the north edge in a LatLon rectangle. |
int |
getNumSegs()
Get the number of segments of the lat/lon lines. |
int |
getRight()
Get the right of XY rectangle. |
float |
getSouthLat()
Get the latitude of the south edge in a LatLon rectangle. |
int |
getTop()
Get the top of XY rectangle. |
float |
getWestLon()
Get the longitude of the west edge in a LatLon rectangle. |
void |
setLocation(float lt1,
float ln1,
float lt2,
float ln2,
int lType)
Set a lat/lon rectangle. |
void |
setLocation(float lt1,
float ln1,
int px1,
int py1,
int px2,
int py2)
Set an XY rectangle relative to a lat/lon point (RENDERTYPE_OFFSET). |
void |
setLocation(int px1,
int py1,
int px2,
int py2)
Set an XY rectangle. |
void |
setNumSegs(int nsegs)
Set the number of segments of the lat/lon lines. |
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry |
clearAttributes, contains, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Field Detail |
protected int x1
protected int y1
protected float lat1
protected float lon1
protected int x2
protected int y2
protected float lat2
protected float lon2
protected int nsegs
Constructor Detail |
public OMRect()
public OMRect(float lt1, float ln1, float lt2, float ln2, int lType)
lt1
- latitude of north edge, decimal degrees.ln1
- longitude of west edge, decimal degrees.lt2
- latitude of south edge, decimal degrees.ln2
- longitude of east edge, decimal degrees.lType
- line type - see OMGraphic.lineType.public OMRect(float lt1, float ln1, float lt2, float ln2, int lType, int nsegs)
lt1
- latitude of north edge, decimal degrees.ln1
- longitude of west edge, decimal degrees.lt2
- latitude of south edge, decimal degrees.ln2
- longitude of east edge, decimal degrees.lType
- line type - see OMGraphic.lineType.nsegs
- number of segment points (only for
LINETYPE_GREATCIRCLE or LINETYPE_RHUMB line types, and
if < 1, this value is generated internally)public OMRect(int px1, int py1, int px2, int py2)
px1
- x pixel position of the first corner relative to the
window originpy1
- y pixel position of the first corner relative to the
window originpx2
- x pixel position of the second corner relative to
the window originpy2
- y pixel position of the second corner relative to
the window originpublic OMRect(float lt1, float ln1, int px1, int py1, int px2, int py2)
lt1
- latitude of the reference point, decimal degrees.ln1
- longitude of the reference point, decimal degrees.px1
- x pixel position of the first corner relative to the
reference pointpy1
- y pixel position of the first corner relative to the
reference pointpx2
- x pixel position of the second corner relative to
the reference pointpy2
- y pixel position of the second corner relative to
the reference pointMethod Detail |
public void setLocation(float lt1, float ln1, float lt2, float ln2, int lType)
lt1
- latitude of north edge, decimal degrees.ln1
- longitude of west edge, decimal degrees.lt2
- latitude of south edge, decimal degrees.ln2
- longitude of east edge, decimal degrees.lType
- line type - see OMGraphic.lineType.public void setLocation(int px1, int py1, int px2, int py2)
px1
- x pixel position of the first corner relative to the
window originpy1
- y pixel position of the first corner relative to the
window originpx2
- x pixel position of the second corner relative to
the window originpy2
- y pixel position of the second corner relative to
the window originpublic void setLocation(float lt1, float ln1, int px1, int py1, int px2, int py2)
lt1
- latitude of the reference point, decimal degrees.ln1
- longitude of the reference point, decimal degrees.px1
- x pixel position of the first corner relative to the
reference pointpy1
- y pixel position of the first corner relative to the
reference pointpx2
- x pixel position of the second corner relative to
the reference pointpy2
- y pixel position of the second corner relative to
the reference pointpublic float getNorthLat()
public float getWestLon()
public float getSouthLat()
public float getEastLon()
public int getTop()
public int getLeft()
public int getBottom()
public int getRight()
public void setNumSegs(int nsegs)
nsegs
- number of segment pointspublic int getNumSegs()
public boolean generate(Projection proj)
generate
in interface OMGeometry
generate
in class OMGraphic
proj
- Projection
OMGraphic.regenerate(com.bbn.openmap.proj.Projection)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |