Package ucar.unidata.idv.control.drawing
Class PolyGlyph
java.lang.Object
ucar.unidata.idv.control.drawing.DrawingGlyph
ucar.unidata.idv.control.drawing.LineGlyph
ucar.unidata.idv.control.drawing.PolyGlyph
- Direct Known Subclasses:
FrontGlyph
Class PolyGlyph draws polygons
- Version:
- $Revision: 1.44 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXml attribute namestatic final StringXml attribute namestatic final intIndices into arraysstatic final intIndices into arraysstatic final intIndices into arraysFields inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
actualPoints, ATTR_BGCOLOR, ATTR_COLOR, ATTR_COORDTYPE, ATTR_FILLED, ATTR_FULLLATLON, ATTR_LINEWIDTH, ATTR_NAME, ATTR_PICKABLE, ATTR_POINTS, ATTR_TEXT, ATTR_TIMEFORMAT, ATTR_TIMES, ATTR_ZPOSITION, control, COORD_LABELS, COORD_LATLON, COORD_LATLONALT, COORD_LONLAT, COORD_NONE, COORD_TYPENAMES, COORD_TYPES, COORD_XY, COORD_XYZ, coordType, firstMoveEarthLocation, firstMoveLocation, IDX_ALT, IDX_LAT, IDX_LON, oldVisibility, parentDisplayable, points, propDialog, propertiesUp, PT_X, PT_Y, PT_Z, selectionDisplayable, stretchIndex, tabbedPane, TAG_ARROW, TAG_FRONT, TAG_HIGH, TAG_IMAGE, TAG_LOW, TAG_MOVIE, TAG_POLYGON, TAG_SHAPE, TAG_SYMBOL, TAG_TEXT, uniqueCnt, zPosition -
Constructor Summary
ConstructorsConstructorDescriptionCtorPolyGlyph(DrawingControl control, DisplayEvent event, boolean smooth) Ctor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPopulate the xml node with attrsbooleanCan we show calculated areabooleanCan we show calculated distancevoiddoDeletePoint(DisplayEvent event) delete the point closest to the eventvoidDo the flythruvoidthis glyph is done being createdvoiddoStretch(DisplayEvent event) Stretch this glyphbooleanGet the Closed property.booleanGet the Extrude property.protected voidgetPropertiesComponents(List comps, Hashtable compMap) get the prop gui compsprotected ListGet points used to select this glyph.booleanGet smoothGet xml tag name to useprotected DatagetTimeField(Data data) Make a field maps all of the time values to the given data as the rangeName to use for this glyphhandleKeyPressed(DisplayEvent event) Handle event.handleMouseDragged(DisplayEvent event) Handle eventhandleMousePressed(DisplayEvent event) Handle eventhandleMouseReleased(DisplayEvent event) handle the mouse eventprotected booleanDo the final initializationvoidinitFromXml(DrawingControl control, Element node) Initialize from xmlbooleanisValid()Do we have a valid number of pointsprotected static voidsetAnimationSet(Displayable d, List timeValues) utility to set the animation set on the displayablevoidsetClosed(boolean value) Set the Closed property.voidsetExtrude(boolean value) Set the Extrude property.voidsetSmooth(boolean v) Set smooth_voidGlyph moved.Methods inherited from class ucar.unidata.idv.control.drawing.LineGlyph
applyProperties, createDisplayable, getLineWidth, initFromUser, setLineWidthMethods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, checkTimeVisibility, checkVisibility, closestPoint, constrainedTo2D, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doMove, evaluateJython, getArea, getAreaString, getBeenRemoved, getBeingCreated, getBgcolor, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDescription, getDisplayable, getDistance, getEditable, getElement, getExtraDescription, getFilled, getFixedAltitude, getFullLatLon, getIsRaster, getLatLons, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleCreation, handleMouseMoved, hide, initFinal, initFromBundle, initMove, initStretch, isFrontDisplay, isInFlatSpace, isInLatLonSpace, isInXYSpace, isSelectable, isVisible, makePoint, mousePressed, moveTo, processPointStrings, processPointStrings, projectionChanged, removeDisplayable, setActualPoints, setBeenRemoved, setBgcolor, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, setVisible, setVisibleFlag, setZPosition, shouldShowBgColorSelector, shouldShowColorSelector, show, smoothCurve, squared, swap, swap, toLatLonAlt, toString, tryToFill, viewpointChanged, writePoints
-
Field Details
-
IDX_X
public static final int IDX_XIndices into arrays- See Also:
-
IDX_Y
public static final int IDX_YIndices into arrays- See Also:
-
IDX_Z
public static final int IDX_ZIndices into arrays- See Also:
-
ATTR_SMOOTH
Xml attribute name- See Also:
-
ATTR_EXTRUDE
Xml attribute name- See Also:
-
-
Constructor Details
-
PolyGlyph
public PolyGlyph()Ctor -
PolyGlyph
public PolyGlyph(DrawingControl control, DisplayEvent event, boolean smooth) throws VisADException, RemoteException Ctor- Parameters:
control- The control I'm in.event- The display event.smooth- Is smooth- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
-
Method Details
-
isValid
public boolean isValid()Do we have a valid number of points- Overrides:
isValidin classDrawingGlyph- Returns:
- Is this glyph valid
-
getPropertiesComponents
get the prop gui comps- Overrides:
getPropertiesComponentsin classLineGlyph- Parameters:
comps- List of compscompMap- comp map
-
doDeletePoint
delete the point closest to the event- Overrides:
doDeletePointin classDrawingGlyph- Parameters:
event- the event- Throws:
RemoteException- on badnessVisADException- on badness
-
doStretch
Stretch this glyph- Overrides:
doStretchin classDrawingGlyph- Parameters:
event- The display event.- Throws:
RemoteException- On badnessVisADException- On badness
-
canShowDistance
public boolean canShowDistance()Can we show calculated distance- Overrides:
canShowDistancein classDrawingGlyph- Returns:
- true
-
canShowArea
public boolean canShowArea()Can we show calculated area- Overrides:
canShowAreain classDrawingGlyph- Returns:
- true
-
doFlythrough
Do the flythru- Throws:
RemoteException- On badnessVisADException- On badness
-
initFromXml
public void initFromXml(DrawingControl control, Element node) throws VisADException, RemoteException Initialize from xml- Overrides:
initFromXmlin classLineGlyph- Parameters:
control- The control I'm in.node- The xml node- Throws:
RemoteException- On badnessVisADException- On badness
-
addAttributes
Populate the xml node with attrs- Overrides:
addAttributesin classLineGlyph- Parameters:
e- Xml node
-
getSelectionPoints
Get points used to select this glyph.- Overrides:
getSelectionPointsin classDrawingGlyph- Returns:
- Selection points
-
getTagName
Get xml tag name to use- Specified by:
getTagNamein classDrawingGlyph- Returns:
- Xml tag name
-
updateLocation
Glyph moved. Update the Displayable location.- Overrides:
updateLocationin classDrawingGlyph- Throws:
RemoteException- On badnessVisADException- On badness
-
handleMousePressed
Handle event- Overrides:
handleMousePressedin classDrawingGlyph- Parameters:
event- The display event.- Returns:
- This or null
- Throws:
RemoteException- When bad things happenVisADException- When bad things happen
-
handleMouseDragged
Handle event- Overrides:
handleMouseDraggedin classDrawingGlyph- Parameters:
event- The display event.- Returns:
- This or null
- Throws:
RemoteException- On badnessVisADException- On badness
-
handleMouseReleased
handle the mouse event- Overrides:
handleMouseReleasedin classDrawingGlyph- Parameters:
event- event- Returns:
- this
- Throws:
RemoteException- on badnessVisADException- on badness
-
doneBeingCreated
public void doneBeingCreated()this glyph is done being created- Overrides:
doneBeingCreatedin classDrawingGlyph
-
handleKeyPressed
Handle event.- Overrides:
handleKeyPressedin classDrawingGlyph- Parameters:
event- The display event.- Returns:
- This or null
- Throws:
RemoteException- On badnessVisADException- On badness
-
getTypeName
Name to use for this glyph- Specified by:
getTypeNamein classDrawingGlyph- Returns:
- The glyph type name
-
getSmooth
public boolean getSmooth()Get smooth- Returns:
- Smooth
-
setSmooth
public void setSmooth(boolean v) Set smooth_- Parameters:
v- Smooth
-
setExtrude
public void setExtrude(boolean value) Set the Extrude property.- Parameters:
value- The new value for Extrude
-
getExtrude
public boolean getExtrude()Get the Extrude property.- Returns:
- The Extrude
-
setClosed
public void setClosed(boolean value) Set the Closed property.- Parameters:
value- The new value for Closed
-
getClosed
public boolean getClosed()Get the Closed property.- Returns:
- The Closed
-
getTimeField
Make a field maps all of the time values to the given data as the range- Overrides:
getTimeFieldin classDrawingGlyph- Parameters:
data- The range- Returns:
- time field
- Throws:
RemoteException- On badnessVisADException- On badness
-
setAnimationSet
protected static void setAnimationSet(Displayable d, List timeValues) throws VisADException, RemoteException utility to set the animation set on the displayable- Parameters:
d- displayabletimeValues- times- Throws:
RemoteException- On badnessVisADException- On badness
-
initFinalInner
Do the final initialization- Overrides:
initFinalInnerin classLineGlyph- Returns:
- Successful
- Throws:
RemoteException- On badnessVisADException- On badness
-