public class OMAreaList extends OMGeometryList implements java.io.Serializable
KNOWN ISSUES: OMAreaLists that wrap around the back of the earth and showing up on both edges of the map are not handled well - you'll end up with lines going horizontally across the map. It's on the to-do list to fix this.
OMList.OMDist<T>
connectParts
allowDuplicates, FIRST_ADDED_ON_TOP, graphics, LAST_ADDED_ON_TOP, NONE, processAllGeometries, traverseMode, vague
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible
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, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, 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, UPDATED
Constructor and Description |
---|
OMAreaList()
Construct an OMAreaList.
|
OMAreaList(int initialCapacity)
Construct an OMAreaList with a capacity to be combined from an initial
amount of OMGeometries.
|
OMAreaList(java.util.List<OMGeometry> list)
Construct an OMAreaList around a List of OMGeometries.
|
Modifier and Type | Method and Description |
---|---|
OMList.OMDist<OMGeometry> |
findClosest(double x,
double y,
float limit,
boolean resetSelect)
Overrides the OMGeometryList and OMGraphicList methods to just call
_distance() on the internal shape object.
|
boolean |
generate(Projection p,
boolean forceProjectAll)
Create the GeneralPath used for the internal Shape objects held by the
OMGeometries added.
|
protected void |
init()
Initialization that sets the OMAreaList, which is a modified
OMGraphicList, to be vague and constructed in a first added, first used
order.
|
protected void |
updateShape(OMGeometry geometry,
Projection p,
boolean forceProject)
Given a OMGeometry, it calls generate/regenerate on it, and then adds the
GeneralPath shape within it to the OMGeometryList shape object.
|
add, add, addAll, addAll, addOMGraphic, clear, create, createDist, get, getConnectParts, iteratorCopy, listIteratorCopy, listIteratorCopy, readGraphics, remove, remove, removeAll, render, renderAllAsSelected, renderGeometry, retainAll, set, setConnectParts
checkForDuplicate, contains, contains, containsAll, deselect, distance, doAction, findAll, findAll, findAllTest, findClosest, findClosest, findClosestTest, findIndexOfClosest, findIndexOfClosest, generate, getAllowDuplicates, getContains, getCopy, getDescription, getDescription, getProcessAllGeometries, getTraverseMode, getWithObject, indexOf, isEmpty, isVague, isVisible, iterator, lastIndexOf, listIterator, listIterator, moveIndexedOneToBack, moveIndexedOneToBottom, moveIndexedOneToFront, moveIndexedOneToTop, moveIndexedToBottom, moveIndexedToFirst, moveIndexedToLast, moveIndexedToTop, objectToOMGraphic, project, project, remove, restore, select, selectClosest, selectClosest, selectClosestTest, setAllowDuplicates, setProcessAllGeometries, setTraverseMode, setVague, setVisible, shouldProcess, size, sort, subList, toArray, toArray
clone, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, readStroke, regenerate, renderLabel, setDeclutterType, setEdgeMatchesFill, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShape, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill, writeStroke
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, setDeclutterType, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill
clearAttributes, contains, distanceToEdge, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape
public OMAreaList()
public OMAreaList(int initialCapacity)
initialCapacity
- the initial capacity of the listpublic OMAreaList(java.util.List<OMGeometry> list)
list
- List of vector OMGeometries.protected void init()
public boolean generate(Projection p, boolean forceProjectAll)
generate
in class OMGeometryList
p
- a Projection
forceProjectAll
- if true, all the geometries on the list are
generated with the new projection. If false they are only
generated if getNeedToRegenerate() returns trueOMGeometry.generate(com.bbn.openmap.proj.Projection)
,
OMGeometry.regenerate(com.bbn.openmap.proj.Projection)
protected void updateShape(OMGeometry geometry, Projection p, boolean forceProject)
updateShape
in class OMGeometryList
public OMList.OMDist<OMGeometry> findClosest(double x, double y, float limit, boolean resetSelect)
findClosest
in class OMList<OMGeometry>
x
- x coordinatey
- y coordinatelimit
- the max distance that a graphic has to be within to be
returned, in pixels.resetSelect
- deselect any OMGraphic touched.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details