ucar.unidata.idv.control.drawing
Class SymbolGlyph

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

public class SymbolGlyph
extends DrawingGlyph

Class SymbolGlyph. Displays a shape.

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

Field Summary
static String ATTR_SCALE
          _more_
static String ATTR_SYMBOL
          _more_
 
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, IDX_X, IDX_Y, IDX_Z, 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
SymbolGlyph()
          Ctor
SymbolGlyph(DrawingControl control, DisplayEvent event)
          The ctor
SymbolGlyph(DrawingControl control, DisplayEvent event, String symbol)
          The ctor
 
Method Summary
protected  void addAttributes(Element e)
          Populate the xml node with attrs
protected  boolean applyProperties(Hashtable compMap)
          _more_
 String getDescription()
          Get the description of this glyph
protected  int getNumInterpolationPoints()
          By default we don't interpolate
protected  void getPropertiesComponents(List comps, Hashtable compMap)
          Make the properties widgetsF
 float getScale()
          Get the Scale property.
 String getSymbol()
          Get the Symbol property.
 String getTagName()
          Get xml tag name to use
 String getTypeName()
          Name to use for this glyph
 DrawingGlyph handleCreation(DisplayEvent event)
          _more_
 DrawingGlyph handleMouseDragged(DisplayEvent event)
          Handle event
 DrawingGlyph handleMousePressed(DisplayEvent event)
          _more_
protected  boolean initFinalInner()
          Init at the end
 void initFromXml(DrawingControl control, Element node)
          Init from xml
 boolean isValid()
          Do we have a valid number of points
 void setPropertySymbol(TwoFacedObject tfo)
          _more_
 void setScale(float value)
          Set the Scale property.
 void setSymbol(String value)
          Set the Symbol property.
 void showSymbolPopup()
          _more_
 void updateLocation()
          The glyph moved.
 
Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, canShowArea, canShowDistance, checkTimeVisibility, checkVisibility, closestPoint, constrainedTo2D, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doMove, doneBeingCreated, doStretch, evaluateJython, getArea, getBeenRemoved, getBeingCreated, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDisplayable, getDistance, getEditable, getElement, getExtraDescription, getFilled, getFixedAltitude, getFullLatLon, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getSelectionPoints, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleKeyPressed, handleMouseMoved, handleMouseReleased, hide, initFinal, initFromBundle, initFromUser, 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

ATTR_SCALE

public static final String ATTR_SCALE
_more_

See Also:
Constant Field Values

ATTR_SYMBOL

public static final String ATTR_SYMBOL
_more_

See Also:
Constant Field Values
Constructor Detail

SymbolGlyph

public SymbolGlyph()
Ctor


SymbolGlyph

public SymbolGlyph(DrawingControl control,
                   DisplayEvent event)
            throws VisADException,
                   RemoteException
The ctor

Parameters:
control - The control I'm in.
event - The display event.
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

SymbolGlyph

public SymbolGlyph(DrawingControl control,
                   DisplayEvent event,
                   String symbol)
            throws VisADException,
                   RemoteException
The ctor

Parameters:
control - The control I'm in.
event - The display event.
symbol - The symbol
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

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

handleCreation

public DrawingGlyph handleCreation(DisplayEvent event)
                            throws VisADException,
                                   RemoteException
_more_

Overrides:
handleCreation in class DrawingGlyph
Parameters:
event - _more_
Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

handleMousePressed

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

Overrides:
handleMousePressed in class DrawingGlyph
Parameters:
event - _more_
Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

applyProperties

protected boolean applyProperties(Hashtable compMap)
                           throws VisADException,
                                  RemoteException
_more_

Overrides:
applyProperties in class DrawingGlyph
Parameters:
compMap - _more_
Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

showSymbolPopup

public void showSymbolPopup()
_more_


setPropertySymbol

public void setPropertySymbol(TwoFacedObject tfo)
_more_

Parameters:
tfo - _more_

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       Hashtable compMap)
Make the properties widgetsF

Overrides:
getPropertiesComponents in class DrawingGlyph
Parameters:
comps - List of components
compMap - Map to hold name to widget

initFinalInner

protected boolean initFinalInner()
                          throws VisADException,
                                 RemoteException
Init at the end

Overrides:
initFinalInner in class DrawingGlyph
Returns:
Success
Throws:
RemoteException - On badness
VisADException - On badness

initFromXml

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

Overrides:
initFromXml in class DrawingGlyph
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 DrawingGlyph
Parameters:
e - Xml node

getTagName

public String getTagName()
Get xml tag name to use

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

getNumInterpolationPoints

protected int getNumInterpolationPoints()
By default we don't interpolate

Returns:
0

updateLocation

public void updateLocation()
                    throws VisADException,
                           RemoteException
The glyph moved. Update location.

Overrides:
updateLocation in class DrawingGlyph
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

getDescription

public String getDescription()
Get the description of this glyph

Overrides:
getDescription in class DrawingGlyph
Returns:
The description

setSymbol

public void setSymbol(String value)
Set the Symbol property.

Parameters:
value - The new value for Symbol

getSymbol

public String getSymbol()
Get the Symbol property.

Returns:
The Symbol

setScale

public void setScale(float value)
Set the Scale property.

Parameters:
value - The new value for Scale

getScale

public float getScale()
Get the Scale property.

Returns:
The Scale