|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.omGraphics.geom.BasicGeometry
com.bbn.openmap.omGraphics.OMGraphic
com.bbn.openmap.omGraphics.OMGraphicList
com.bbn.openmap.layer.link.LinkOMGraphicList
This class extends the OMGraphicList by allowing searches on the AppObject contained by the OMGraphics on the list. The AppObject is where the LinkGraphics store the graphic ID as defined by the server. It also returns indexes from searches instead of the graphic. This allows for deletions, replacements and graphic location movement from within the list.
Nested Class Summary |
Nested classes inherited from class com.bbn.openmap.omGraphics.OMGraphicList |
OMGraphicList.OMDist |
Field Summary | |
protected Projection |
currentProjection
|
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphicList |
allowDuplicates, FIRST_ADDED_ON_TOP, graphics, LAST_ADDED_ON_TOP, NONE, processAllGeometries, traverseMode, vague |
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 | |
LinkOMGraphicList()
Construct an OMGraphicList. |
|
LinkOMGraphicList(int initialCapacity)
Construct an OMGraphicList with an initial capacity. |
Method Summary | |
void |
_add(OMGeometry g)
Add an OMGraphic to the GraphicList. |
protected java.lang.Object |
_remove(int location)
Remove the graphic at a location in the list. |
protected boolean |
_remove(OMGeometry geometry)
Remove the graphic. |
void |
clear()
Remove all elements from the graphic list. |
boolean |
getNeedToRegenerate(Projection proj)
Check whether the list needs to be regenerated, considering the projection that the OMGraphics were projected with when the list was read. |
int |
getOMGraphicIndexWithId(java.lang.String gid)
Get the graphic with the graphic ID. |
OMGraphic |
getOMGraphicWithId(java.lang.String gid)
Get the graphic with the graphic ID. |
Projection |
getProjection()
|
void |
render(java.awt.Graphics gr)
Renders all the objects in the list a graphics context. |
void |
setOMGraphicAt(OMGraphic graphic,
int index)
Set the graphic at the specified location. |
void |
setProjection(Projection proj)
|
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, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate |
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, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate |
Field Detail |
protected Projection currentProjection
Constructor Detail |
public LinkOMGraphicList()
public LinkOMGraphicList(int initialCapacity)
initialCapacity
- the initial capacity of the listMethod Detail |
public void setProjection(Projection proj)
public Projection getProjection()
public boolean getNeedToRegenerate(Projection proj)
public void _add(OMGeometry g)
_add
in class OMGraphicList
g
- the non-null OMGraphic to add
java.lang.IllegalArgumentException
- if OMGraphic is nullprotected java.lang.Object _remove(int location)
_remove
in class OMGraphicList
location
- the OMGraphic object to remove.
protected boolean _remove(OMGeometry geometry)
_remove
in class OMGraphicList
geometry
- the OMGeometry object to remove.
public void setOMGraphicAt(OMGraphic graphic, int index)
setOMGraphicAt
in class OMGraphicList
graphic
- OMGraphicindex
- index of the OMGraphic to return
java.lang.ArrayIndexOutOfBoundsException
- if index is
out-of-boundspublic OMGraphic getOMGraphicWithId(java.lang.String gid)
gid
- graphic ID of the wanted graphic.
public int getOMGraphicIndexWithId(java.lang.String gid)
gid
- graphic ID of the wanted graphic.
public void clear()
clear
in class OMGraphicList
public void render(java.awt.Graphics gr)
paint()
for AWT components. The
graphics are rendered in the order of traverseMode. Any
graphics where isVisible()
returns false are not
rendered.
render
in class OMGraphicList
gr
- the AWT Graphics context
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |