Package hec.map.aishape
Class AiShapeGlyph
java.lang.Object
hec.map.MapGlyph
hec.map.aishape.AiShapeGlyph
- All Implemented Interfaces:
ModifiableListener
,AiShapeConst
,ShapeSource
,TracksRepaint
,Comparable<MapGlyph>
,EventListener
public class AiShapeGlyph
extends MapGlyph
implements AiShapeConst, ShapeSource, ModifiableListener, TracksRepaint
-
Nested Class Summary
Nested classes/interfaces inherited from class hec.map.MapGlyph
MapGlyph.Selection
-
Field Summary
FieldsFields inherited from class hec.map.MapGlyph
_changeEvent, _glyphLevel, _listenerList, _map, _mapIdentifier, _mapPanel, _paintOk, _parentGlyph, maxPtArraySz, needsRepaint, xarray, XOR_COLOR, yarray
Fields inherited from interface hec.map.aishape.AiShapeConst
DEBUG, FILE_CODE, HIGHLIGHT_MODIFIER, QUERY_FLASH_LENGTH, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTI_POINT, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINT_M, SHAPE_TYPE_POINT_Z, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGON_M, SHAPE_TYPE_POLYGON_Z, SHAPE_TYPE_POLYLINE_M, SHAPE_TYPE_POLYLINE_Z, VERSION, XY_QUERY_TOLERANCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
close()
called when the Glyph is no longer held by the MapPanelvoid
draw this MapGlyph to graphics using the MapScale sclvoid
fillMap
(boolean load) have the _map load or unload its data.Returns the Well Known Text Representation of the projection.Gets the DataRecord of the MapGlyph's MapIdentifier objectGets the DefaultDataRecord of the MapGlyph objectGet list of AiShapeFieldDescriptorsint
getShapeObjects
(double containmentBuffer, WorldPt pt) getShapeObjects
(int x, int y) Returns a list of "Import" Shape Objects from this source.void
highlightRecords
(List shapes, int centerPointGraphic) protected void
init()
called when the MapGlyph is made active.void
modifiedStateChanged
(Modifiable obj, boolean modified) void
selectPoints
(List<WorldPt> worldPts) void
Sets the DataRecord of the MapGlyph's MapIdentifierdouble[][]
simplify
(double[] xpts, double[] ypts, double range, int startIdx, int endIdx) protected AiShapeArc
transformArcLine
(Transform txform, AiShapeArc arcLine) protected boolean
transformArcShapes
(CoordinateReferenceSystem dataCRS, CoordinateReferenceSystem toCRS) protected AiShapePolygon
transformPolygon
(Transform txform, AiShapePolygon arcPoly) protected boolean
transformPolyShapes
(CoordinateReferenceSystem dataCRS, CoordinateReferenceSystem toCRS) protected WorldLine
transformWorldLine
(Transform txform, WorldLine worldLine) protected WorldPt
transformWorldPt
(Transform txform, WorldPt wpt) Transform WorldPt to display coordinate system.protected WorldRegion
transformWorldRegion
(Transform txform, WorldRegion worldRegion) Return a Coordinate transformed copy of the WorldRegionMethods inherited from class hec.map.MapGlyph
addChangeListener, addGlyphSelectionListener, checkXYArraySize, clearSelection, clearSelection, compareTo, containsSelection, drawConformingString, drawConformingString2, drawLine, drawLine, drawLine, drawLine, drawLine2D, drawRegion, drawRegion, findGlyphOfClass, findObject, fireGlyphSelectionChanged, fireStateChanged, getAttributeSet, getBounds, getDescription, getGlyphLevel, getMap, getMapPanel, getMaximumScale, getMinimumScale, getName, getParentGlyph, getSelectedObject, getSelections, getToolTipText, glyphVector, hasChildGlyphs, hasMap, intersects, isAltDown, isAttributeAvailable, isControlDown, isMetaDown, isPaintOk, isRepaintNeeded, isShiftDown, isShown, isWriteLocked, objectDoubleClick, objectPopupMenu, objectSelect, reInit, removeChangeListener, removeGlyphSelectionListener, setGlyphLevel, setMap, setMapPanel, setMaximumScale, setMinimumScale, setPaintOk, setParentGlyph, setRepaintNeeded, setShown, shouldReturn, showMapElement, toString, transformArrays, transformLocalToWorldArrays, transformLookup, transformPoint, transformPointToLocal, transformPointToWorld, transformRect, transformRect, transformRectToLocal, transformWorldToLocalArrays
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hec.map.importer.ShapeSource
getName
Methods inherited from interface hec.map.renderer.TracksRepaint
isRepaintNeeded, setRepaintNeeded
-
Field Details
-
DEFAULT_NUM_POINTS
public static final int DEFAULT_NUM_POINTS- See Also:
-
-
Constructor Details
-
AiShapeGlyph
-
-
Method Details
-
close
public void close()Description copied from class:MapGlyph
called when the Glyph is no longer held by the MapPanel -
init
protected void init()Description copied from class:MapGlyph
called when the MapGlyph is made active. Any initialization should be performed here. -
getDefaultDataRecord
Description copied from class:MapGlyph
Gets the DefaultDataRecord of the MapGlyph object- Overrides:
getDefaultDataRecord
in classMapGlyph
- Returns:
- null unless overridden to return something else
-
getDataRecord
Description copied from class:MapGlyph
Gets the DataRecord of the MapGlyph's MapIdentifier object- Overrides:
getDataRecord
in classMapGlyph
- Returns:
- The DataRecord value
-
setDataRecord
Description copied from class:MapGlyph
Sets the DataRecord of the MapGlyph's MapIdentifier- Overrides:
setDataRecord
in classMapGlyph
- Parameters:
rec
- The new DataRecord value
-
getMapType
public int getMapType() -
getShapeObjects
-
getShapeObjects
-
getShapeObjects
-
getAttributeVector
-
fillMap
public void fillMap(boolean load) Description copied from class:MapGlyph
have the _map load or unload its data. -
getFieldDescriptors
Get list of AiShapeFieldDescriptors- Specified by:
getFieldDescriptors
in interfaceShapeSource
- Returns:
-
draw
Description copied from class:MapGlyph
draw this MapGlyph to graphics using the MapScale scl -
modifiedStateChanged
- Specified by:
modifiedStateChanged
in interfaceModifiableListener
-
simplify
public double[][] simplify(double[] xpts, double[] ypts, double range, int startIdx, int endIdx) -
selectPoints
- Parameters:
worldPts
-
-
clearSelections
public void clearSelections() -
highlightRecords
- Specified by:
highlightRecords
in interfaceShapeSource
-
clearHighlights
public void clearHighlights()- Specified by:
clearHighlights
in interfaceShapeSource
-
addShapeHighlight
-
getShapes
Description copied from interface:ShapeSource
Returns a list of "Import" Shape Objects from this source.- Specified by:
getShapes
in interfaceShapeSource
- Returns:
-
getCoordinateReferenceSystem
Description copied from interface:ShapeSource
Returns the Well Known Text Representation of the projection.- Specified by:
getCoordinateReferenceSystem
in interfaceShapeSource
- Returns:
- the WKT or NULL if there is no projection.
-
transformArcShapes
protected boolean transformArcShapes(CoordinateReferenceSystem dataCRS, CoordinateReferenceSystem toCRS) -
transformArcLine
-
transformWorldLine
-
transformPolyShapes
protected boolean transformPolyShapes(CoordinateReferenceSystem dataCRS, CoordinateReferenceSystem toCRS) -
transformPolygon
-
transformWorldRegion
Return a Coordinate transformed copy of the WorldRegion -
transformWorldPt
Transform WorldPt to display coordinate system. wpt has the result of the transform.
-