|
||||||||||
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.OMGraphicAdapter com.bbn.openmap.omGraphics.OMList<OMGraphic> com.bbn.openmap.omGraphics.OMGraphicList com.bbn.openmap.layer.link.LinkOMGraphicList
public class 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/interfaces inherited from class com.bbn.openmap.omGraphics.OMList |
---|
OMList.OMDist<T> |
Field Summary | |
---|---|
protected Projection |
currentProjection
|
Fields inherited from class com.bbn.openmap.omGraphics.OMList |
---|
allowDuplicates, FIRST_ADDED_ON_TOP, graphics, LAST_ADDED_ON_TOP, NONE, processAllGeometries, traverseMode, vague |
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphicAdapter |
---|
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask |
Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
---|
attributes, lineType, needToRegenerate, shape, visible |
Constructor Summary | |
---|---|
LinkOMGraphicList()
Construct an OMGraphicList. |
|
LinkOMGraphicList(int initialCapacity)
Construct an OMGraphicList with an initial capacity. |
Method Summary | |
---|---|
protected java.lang.Object |
_remove(int location)
Remove the graphic at a location in the list. |
protected boolean |
_remove(OMGeometry geometry)
Remove the graphic. |
boolean |
add(OMGraphic g)
Add an OMGraphic to the GraphicList. |
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.OMGraphicList |
---|
add, addAll, addAll, clone, create, createDist, get, getOMGraphicAt, getTargets, iteratorCopy, listIteratorCopy, listIteratorCopy, objectToOMGraphic, readGraphics, readGraphics, remove, set, setFillPaint, setGridGenerator, setLinePaint, setMatted, setMattingPaint, setSelectPaint, setStroke, setTargets, setTextureMask, sort, writeGraphics, writeGraphics |
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
---|
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
equals, hashCode |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGraphic |
---|
getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, setDeclutterType, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setRenderType, setSelected, setShowEditablePalette, shouldRenderEdge, shouldRenderFill |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry |
---|
clearAttributes, contains, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape |
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 boolean add(OMGraphic g)
add
in interface java.util.Collection<OMGraphic>
add
in interface java.util.List<OMGraphic>
add
in class OMGraphicList
g
- the non-null OMGraphic to add
java.lang.IllegalArgumentException
- if OMGraphic is nullprotected java.lang.Object _remove(int location)
location
- the OMGraphic object to remove.
protected boolean _remove(OMGeometry geometry)
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 interface java.util.Collection<OMGraphic>
clear
in interface java.util.List<OMGraphic>
clear
in class OMList<OMGraphic>
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 interface OMGeometry
render
in class OMList<OMGraphic>
gr
- the AWT Graphics context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |