Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.layer.link
Class LinkOMGraphicList

    java.lang.Object
      com.bbn.openmap.omGraphics.geom.BasicGeometry
          com.bbn.openmap.omGraphics.OMGraphic
              com.bbn.openmap.omGraphics.OMGraphicList
                  com.bbn.openmap.layer.link.LinkOMGraphicList

All Implemented Interfaces:
  java.lang.Cloneable, GraphicList, LinkPropertiesConstants, OMGeometry, OMGraphicConstants, java.io.Serializable

public class LinkOMGraphicList
extends OMGraphicList
implements LinkPropertiesConstants

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.

See Also:
  Serialized Form

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`

Fields inherited from interface com.bbn.openmap.layer.link.LinkPropertiesConstants
`LPC_BACKWARD_DIAG_PATTERN, LPC_CENTER_LAT, LPC_CENTER_LONG, LPC_CLEAR_PROPERTIES, LPC_CLEAR_PROPERTIES_CHAR, LPC_CROSS_PATTERN, LPC_DASH, LPC_DASH_DOT, LPC_DASH_DOT_DOT, LPC_DIAG_CROSS_PATTERN, LPC_DOT, LPC_FILLCOLOR, LPC_FILLPATTERN, LPC_FORWARD_DIAG_PATTERN, LPC_GRAPHICID, LPC_HEIGHT, LPC_HIGHLIGHTCOLOR, LPC_HORIZONTAL_PATTERN, LPC_HTML, LPC_INFO, LPC_LATMAX, LPC_LATMIN, LPC_LINECOLOR, LPC_LINESTYLE, LPC_LINEWIDTH, LPC_LINKRASTERIMAGEURL, LPC_LINKROTATION, LPC_LINKTEXTBASELINE, LPC_LINKTEXTFONT, LPC_LINKTEXTSTRING, LPC_LONG_DASH, LPC_LONMAX, LPC_LONMIN, LPC_MESSAGE, LPC_OLD_FILLCOLOR, LPC_OLD_FILLPATTERN, LPC_OLD_HIGHLIGHTCOLOR, LPC_OLD_LINECOLOR, LPC_OLD_LINESTYLE, LPC_OLD_LINEWIDTH, LPC_OLD_LINKTEXTFONT, LPC_OLD_LINKTEXTSTRING, LPC_PROJECTION, LPC_PROPERY_MANAGEMENT_POLICY, LPC_PROPERY_MANAGEMENT_POLICY_CHAR, LPC_REUSE_PROPERTIES, LPC_REUSE_PROPERTIES_CHAR, LPC_SCALE, LPC_SOLID, LPC_SOLID_PATTERN, LPC_TIME, LPC_URL, LPC_VERTICAL_PATTERN, LPC_WIDTH`

Fields inherited from interface com.bbn.openmap.omGraphics.OMGraphicConstants
`ADD_GRAPHIC_MASK, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK`

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.OMGraphicList
`_doAction, _findClosest, _findClosest, _getAt, _getContains, _getWithAppObject, _indexOf, _insert, _selectClosest, _setAt, add, addOMGraphic, checkForDuplicate, clone, contains, deselect, deselectAll, distance, doAction, findAll, findAll, findAllTest, findClosest, findClosest, findClosestTest, findIndexOfClosest, findIndexOfClosest, generate, generate, getAllowDuplicates, getDescription, getDescription, getOMGraphicAt, getOMGraphicThatContains, getOMGraphicWithAppObject, getProcessAllGeometries, getTargets, getTraverseMode, indexOf, insertOMGraphicAt, isEmpty, isVague, isVisible, iterator, moveIndexedOneToBack, moveIndexedOneToBottom, moveIndexedOneToFront, moveIndexedOneToTop, moveIndexedToBottom, moveIndexedToFirst, moveIndexedToLast, moveIndexedToTop, objectToOMGraphic, project, project, readGraphics, readGraphics, remove, removeOMGraphicAt, renderAllAsSelected, select, selectAll, selectClosest, selectClosest, selectClosestTest, setAllowDuplicates, setFillPaint, setGridGenerator, setLinePaint, setMatted, setMattingPaint, setProcessAllGeometries, setSelectPaint, setStroke, setTargets, setTextureMask, setTraverseMode, setVague, setVisible, shouldProcess, size, sort, writeGraphics, writeGraphics`

Methods inherited from class com.bbn.openmap.omGraphics.OMGraphic
`getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, setDeclutterType, setEdgeMatchesFill, setFillColor, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setRenderType, setSelectColor, setSelected, setShape, setShowEditablePalette, shouldRenderEdge, shouldRenderFill`

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

### currentProjection

    protected Projection currentProjection

Constructor Detail

### LinkOMGraphicList

    public LinkOMGraphicList()

  Construct an OMGraphicList.

### LinkOMGraphicList

    public LinkOMGraphicList(int initialCapacity)

  Construct an OMGraphicList with an initial capacity.

Parameters:
  `initialCapacity` - the initial capacity of the list

Method Detail

### setProjection

    public void setProjection(Projection proj)

### getProjection

    public Projection getProjection()

### getNeedToRegenerate

    public 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. The projection equality projection is lazy, just checks objects.

### _add

    public void _add(OMGeometry g)

  Add an OMGraphic to the GraphicList. The OMGraphic must not be null.

  Overrides:
    `_add` in class `OMGraphicList`
  Parameters:
    `g` - the non-null OMGraphic to add
  Throws:
    `java.lang.IllegalArgumentException` - if OMGraphic is null

### _remove

    protected java.lang.Object _remove(int location)

  Remove the graphic at a location in the list.

  Overrides:
    `_remove` in class `OMGraphicList`
  Parameters:
    `location` - the OMGraphic object to remove.
  Returns:
    true if graphic was on the list, false if otherwise.

### _remove

    protected boolean _remove(OMGeometry geometry)

  Remove the graphic. If this list is not vague, it will also ask sub-OMGraphicLists to remove it if the geometry isn't found on this OMGraphicList.

  Overrides:
    `_remove` in class `OMGraphicList`
  Parameters:
    `geometry` - the OMGeometry object to remove.
  Returns:
    true if geometry was on the list, false if otherwise.

### setOMGraphicAt

    public void setOMGraphicAt(OMGraphic graphic,
                               int index)

  Set the graphic at the specified location. The OMGraphic must not be null, the AppObject in the OMGraphic must be null or a LinkProperties object. This method is extended from OMGraphicList so the link id is added to the hashtable for faster searching.

  Overrides:
    `setOMGraphicAt` in class `OMGraphicList`
  Parameters:
    `graphic` - OMGraphic
    `index` - index of the OMGraphic to return
  Throws:
    `java.lang.ArrayIndexOutOfBoundsException` - if index is out-of-bounds

### getOMGraphicWithId

    public OMGraphic getOMGraphicWithId(java.lang.String gid)

  Get the graphic with the graphic ID.

  Parameters:
    `gid` - graphic ID of the wanted graphic.
  Returns:
    OMGraphic or null if not found

### getOMGraphicIndexWithId

    public int getOMGraphicIndexWithId(java.lang.String gid)

  Get the graphic with the graphic ID. Traverse mode doesn't matter.

  Parameters:
    `gid` - graphic ID of the wanted graphic.
  Returns:
    OMGraphic index or Link.UNKNOWN if not found

### clear

    public void clear()

  Remove all elements from the graphic list.

  Overrides:
    `clear` in class `OMGraphicList`

### render

    public void render(java.awt.Graphics gr)

  Renders all the objects in the list a graphics context. This is the same as `paint()` for AWT components. The graphics are rendered in the order of traverseMode. Any graphics where `isVisible()` returns false are not rendered.

  Overrides:
    `render` in class `OMGraphicList`
  Parameters:
    `gr` - the AWT Graphics context

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details