ucar.unidata.idv.control.drawing
Class PolyGlyph

java.lang.Object
  extended by ucar.unidata.idv.control.drawing.DrawingGlyph
      extended by ucar.unidata.idv.control.drawing.LineGlyph
          extended by ucar.unidata.idv.control.drawing.PolyGlyph

public class PolyGlyph
extends LineGlyph

Class PolyGlyph draws polygons

Version:
$Revision: 1.44 $
Author:
IDV Development Team

Field Summary
static String ATTR_EXTRUDE
          Xml attribute name
static String ATTR_SMOOTH
          Xml attribute name
static int IDX_X
          Indices into arrays
static int IDX_Y
          Indices into arrays
static int IDX_Z
          Indices into arrays
 
Fields inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
actualPoints, ATTR_COLOR, ATTR_COORDTYPE, ATTR_FILLED, ATTR_FULLLATLON, ATTR_LINEWIDTH, ATTR_NAME, ATTR_PICKABLE, ATTR_POINTS, ATTR_TEXT, ATTR_TIMES, ATTR_ZPOSITION, control, COORD_LABELS, COORD_LATLON, COORD_LATLONALT, COORD_NONE, COORD_TYPENAMES, COORD_TYPES, COORD_XY, COORD_XYZ, coordType, firstMoveEarthLocation, firstMoveLocation, IDX_ALT, IDX_LAT, IDX_LON, 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
PolyGlyph()
          Ctor
PolyGlyph(DrawingControl control, DisplayEvent event, boolean smooth)
          Ctor
 
Method Summary
protected  void addAttributes(Element e)
          Populate the xml node with attrs
 boolean canShowArea()
          Can we show calculated area
 boolean canShowDistance()
          Can we show calculated distance
 void doFlythrough()
          Do the flythru
 void doStretch(DisplayEvent event)
          Stretch this glyph
 boolean getExtrude()
          Get the Extrude property.
protected  void getPropertiesComponents(List comps, Hashtable compMap)
          get the prop gui comps
protected  List getSelectionPoints()
          Get points used to select this glyph.
 boolean getSmooth()
          Get smooth
 String getTagName()
          Get xml tag name to use
 String getTypeName()
          Name to use for this glyph
 DrawingGlyph handleKeyPressed(DisplayEvent event)
          Handle event.
 DrawingGlyph handleMouseDragged(DisplayEvent event)
          Handle event
 DrawingGlyph handleMousePressed(DisplayEvent event)
          Handle event
 void initFromXml(DrawingControl control, Element node)
          Initialize from xml
 boolean isValid()
          Do we have a valid number of points
 void setExtrude(boolean value)
          Set the Extrude property.
 void setSmooth(boolean v)
          Set smooth_
 void updateLocation()
          Glyph moved.
 
Methods inherited from class ucar.unidata.idv.control.drawing.LineGlyph
applyProperties, createDisplayable, getLineWidth, initFinalInner, initFromUser, setLineWidth
 
Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, checkTimeVisibility, checkVisibility, closestPoint, constrainedTo2D, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doMove, doneBeingCreated, evaluateJython, getArea, getBeenRemoved, getBeingCreated, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDescription, getDisplayable, getDistance, getEditable, getElement, getExtraDescription, getFilled, getFixedAltitude, getFullLatLon, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleCreation, handleMouseMoved, handleMouseReleased, hide, initFinal, initFromBundle, initMove, initStretch, isInFlatSpace, isInLatLonSpace, isInXYSpace, isSelectable, isVisible, makePoint, mousePressed, moveTo, processPointStrings, projectionChanged, removeDisplayable, setActualPoints, setBeenRemoved, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, setVisible, setVisibleFlag, setZPosition, shouldShowColorSelector, show, smoothCurve, squared, swap, swap, toLatLonAlt, toString, tryToFill, viewpointChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IDX_X

public static final int IDX_X
Indices into arrays

See Also:
Constant Field Values

IDX_Y

public static final int IDX_Y
Indices into arrays

See Also:
Constant Field Values

IDX_Z

public static final int IDX_Z
Indices into arrays

See Also:
Constant Field Values

ATTR_SMOOTH

public static final String ATTR_SMOOTH
Xml attribute name

See Also:
Constant Field Values

ATTR_EXTRUDE

public static final String ATTR_EXTRUDE
Xml attribute name

See Also:
Constant Field Values
Constructor Detail

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 happen
VisADException - When bad things happen
Method Detail

isValid

public boolean isValid()
Do we have a valid number of points

Overrides:
isValid in class DrawingGlyph
Returns:
Is this glyph valid

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       Hashtable compMap)
get the prop gui comps

Overrides:
getPropertiesComponents in class LineGlyph
Parameters:
comps - List of comps
compMap - comp map

doStretch

public void doStretch(DisplayEvent event)
               throws VisADException,
                      RemoteException
Stretch this glyph

Overrides:
doStretch in class DrawingGlyph
Parameters:
event - The display event.
Throws:
RemoteException - On badness
VisADException - On badness

canShowDistance

public boolean canShowDistance()
Can we show calculated distance

Overrides:
canShowDistance in class DrawingGlyph
Returns:
true

canShowArea

public boolean canShowArea()
Can we show calculated area

Overrides:
canShowArea in class DrawingGlyph
Returns:
true

doFlythrough

public void doFlythrough()
                  throws VisADException,
                         RemoteException
Do the flythru

Throws:
RemoteException - On badness
VisADException - On badness

initFromXml

public void initFromXml(DrawingControl control,
                        Element node)
                 throws VisADException,
                        RemoteException
Initialize from xml

Overrides:
initFromXml in class LineGlyph
Parameters:
control - The control I'm in.
node - The xml node
Throws:
RemoteException - On badness
VisADException - On badness

addAttributes

protected void addAttributes(Element e)
Populate the xml node with attrs

Overrides:
addAttributes in class LineGlyph
Parameters:
e - Xml node

getSelectionPoints

protected List getSelectionPoints()
Get points used to select this glyph.

Overrides:
getSelectionPoints in class DrawingGlyph
Returns:
Selection points

getTagName

public String getTagName()
Get xml tag name to use

Specified by:
getTagName in class DrawingGlyph
Returns:
Xml tag name

updateLocation

public void updateLocation()
                    throws VisADException,
                           RemoteException
Glyph moved. Update the Displayable location.

Overrides:
updateLocation in class DrawingGlyph
Throws:
RemoteException - On badness
VisADException - On badness

handleMousePressed

public DrawingGlyph handleMousePressed(DisplayEvent event)
                                throws VisADException,
                                       RemoteException
Handle event

Overrides:
handleMousePressed in class DrawingGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

handleMouseDragged

public DrawingGlyph handleMouseDragged(DisplayEvent event)
                                throws VisADException,
                                       RemoteException
Handle event

Overrides:
handleMouseDragged in class DrawingGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - On badness
VisADException - On badness

handleKeyPressed

public DrawingGlyph handleKeyPressed(DisplayEvent event)
                              throws VisADException,
                                     RemoteException
Handle event.

Overrides:
handleKeyPressed in class DrawingGlyph
Parameters:
event - The display event.
Returns:
This or null
Throws:
RemoteException - On badness
VisADException - On badness

getTypeName

public String getTypeName()
Name to use for this glyph

Specified by:
getTypeName in class DrawingGlyph
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