ucar.unidata.idv.control.drawing
Class TransectGlyph

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.ShapeGlyph
              extended by ucar.unidata.idv.control.drawing.TransectGlyph

public class TransectGlyph
extends ShapeGlyph

Class TransectGlyph. Displays a shape.

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

Field Summary
 
Fields inherited from class ucar.unidata.idv.control.drawing.ShapeGlyph
ATTR_SHAPETYPE, SHAPE_DIAMOND, SHAPE_HARROW, SHAPE_LINE, SHAPE_NAMES, SHAPE_OVAL, SHAPE_RECTANGLE, SHAPE_VARROW, SHAPES
 
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
TransectGlyph()
          Ctor
TransectGlyph(DrawingControl control, DisplayEvent event, boolean editable)
          The ctor
TransectGlyph(DrawingControl control, DisplayEvent event, boolean editable, boolean showText)
          The ctor
 
Method Summary
protected  boolean applyProperties(Hashtable compMap)
          Apply the properties
 void checkBoxVisibility()
          Check if we need to show/hide the max data distance box
 void checkTimeVisibility()
          override this because we ignore time
 String getDescription()
          Get the glyph description
 String getEndText()
          Get the EndText property.
 String getExtraDescription()
          Add on extra description.
 boolean getForDisplay()
          Get the ForDisplay property.
 Real getMaxDataDistance()
          Get the MaxDataDistance property.
protected  int getNumInterpolationPoints()
          How many points do we interpolate along the line
protected  void getPropertiesComponents(List comps, Hashtable compMap)
          Add to the properties list
 String getStartText()
          Get the StartText property.
 String getTypeName()
          Name to use for this glyph
 ViewDescriptor getViewDescriptor()
          Get the ViewDescriptor property.
 DrawingGlyph handleMouseDragged(DisplayEvent event)
          Handle event
protected  boolean initFinalInner()
          Init at the end
 boolean isSelectable()
          Can the user select this glyph
 void setEndText(String value)
          Set the EndText property.
 void setLineWidth(float value)
          Set the LineWidth property.
 void setMaxDataDistance(Real value)
          Set the MaxDataDistance property.
 void setStartText(String value)
          Set the StartText property.
 void setViewDescriptor(ViewDescriptor value)
          Set the ViewDescriptor property.
 void setVisible(boolean visible)
          Toggle the visibility
 void updateLocation()
          Handle glyph moved
 
Methods inherited from class ucar.unidata.idv.control.drawing.ShapeGlyph
addAttributes, canShowArea, canShowDistance, constrainedTo2D, getShapeType, getTagName, handleMousePressed, initFromXml, interpolate, isValid, makeRectangle, setShapeType
 
Methods inherited from class ucar.unidata.idv.control.drawing.LineGlyph
createDisplayable, getLineWidth, initFromUser
 
Methods inherited from class ucar.unidata.idv.control.drawing.DrawingGlyph
addDisplayable, addTime, checkVisibility, closestPoint, distance, distanceBetween, distanceBetween, doInterpolatedStretch, doMove, doneBeingCreated, doStretch, evaluateJython, getArea, getBeenRemoved, getBeingCreated, getBoundingBox, getBoxPoint, getBoxPoint, getBoxPoint, getColor, getCoordType, getCreatedByUser, getDefaultZPosition, getDisplayable, getDistance, getEditable, getElement, getFilled, getFixedAltitude, getFullLatLon, getLatLons, getName, getParent, getPickable, getPoint, getPoints, getPointValues, getPointValues, getPointValuesDouble, getPointValuesDouble, getSelectionPoints, getTimeField, getTimePropertiesComponents, getTimeValues, getVisibleFlag, getZPosition, handleCreation, handleKeyPressed, handleMouseMoved, handleMouseReleased, hide, initFinal, initFromBundle, initMove, initStretch, isInFlatSpace, isInLatLonSpace, isInXYSpace, isVisible, makePoint, mousePressed, moveTo, processPointStrings, projectionChanged, removeDisplayable, setActualPoints, setBeenRemoved, setColor, setColor, setCoordType, setCreatedByUser, setEditable, setFilled, setFullLatLon, setName, setPickable, setPoints, setProperties, setSelected, setTimeValues, 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
 

Constructor Detail

TransectGlyph

public TransectGlyph()
Ctor


TransectGlyph

public TransectGlyph(DrawingControl control,
                     DisplayEvent event,
                     boolean editable)
              throws VisADException,
                     RemoteException
The ctor

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

TransectGlyph

public TransectGlyph(DrawingControl control,
                     DisplayEvent event,
                     boolean editable,
                     boolean showText)
              throws VisADException,
                     RemoteException
The ctor

Parameters:
control - The control I'm in.
event - The display event.
editable - Is this glyph editable
showText - Should we show the end point text
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen
Method Detail

getNumInterpolationPoints

protected int getNumInterpolationPoints()
How many points do we interpolate along the line

Overrides:
getNumInterpolationPoints in class ShapeGlyph
Returns:
10

setVisible

public void setVisible(boolean visible)
                throws VisADException,
                       RemoteException
Toggle the visibility

Overrides:
setVisible in class DrawingGlyph
Parameters:
visible - is visible
Throws:
RemoteException - On badness
VisADException - On badness

checkTimeVisibility

public void checkTimeVisibility()
                         throws VisADException,
                                RemoteException
override this because we ignore time

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

checkBoxVisibility

public void checkBoxVisibility()
                        throws VisADException,
                               RemoteException
Check if we need to show/hide the max data distance box

Throws:
RemoteException - On badness
VisADException - On badness

updateLocation

public void updateLocation()
                    throws VisADException,
                           RemoteException
Handle glyph moved

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

setLineWidth

public void setLineWidth(float value)
Set the LineWidth property.

Overrides:
setLineWidth in class LineGlyph
Parameters:
value - The new value for LineWidth

getExtraDescription

public String getExtraDescription()
Add on extra description. This shows up in the JTable

Overrides:
getExtraDescription in class DrawingGlyph
Returns:
Extra description

initFinalInner

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

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

handleMouseDragged

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

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

getPropertiesComponents

protected void getPropertiesComponents(List comps,
                                       Hashtable compMap)
Add to the properties list

Overrides:
getPropertiesComponents in class LineGlyph
Parameters:
comps - List of label/widgets
compMap - Optional mapping to hold components for later access

applyProperties

protected boolean applyProperties(Hashtable compMap)
                           throws VisADException,
                                  RemoteException
Apply the properties

Overrides:
applyProperties in class LineGlyph
Parameters:
compMap - Optional map that holds components
Returns:
Success
Throws:
RemoteException - On badness
VisADException - On badness

getTypeName

public String getTypeName()
Name to use for this glyph

Overrides:
getTypeName in class ShapeGlyph
Returns:
The glyph type name

setStartText

public void setStartText(String value)
Set the StartText property.

Parameters:
value - The new value for StartText

getStartText

public String getStartText()
Get the StartText property.

Returns:
The StartText

setEndText

public void setEndText(String value)
Set the EndText property.

Parameters:
value - The new value for EndText

getEndText

public String getEndText()
Get the EndText property.

Returns:
The EndText

getDescription

public String getDescription()
Get the glyph description

Overrides:
getDescription in class ShapeGlyph
Returns:
The description

isSelectable

public boolean isSelectable()
Can the user select this glyph

Overrides:
isSelectable in class DrawingGlyph
Returns:
Is this glyph selectable

getForDisplay

public boolean getForDisplay()
Get the ForDisplay property.

Returns:
The ForDisplay

setViewDescriptor

public void setViewDescriptor(ViewDescriptor value)
Set the ViewDescriptor property.

Parameters:
value - The new value for ViewDescriptor

getViewDescriptor

public ViewDescriptor getViewDescriptor()
Get the ViewDescriptor property.

Returns:
The ViewDescriptor

setMaxDataDistance

public void setMaxDataDistance(Real value)
Set the MaxDataDistance property.

Parameters:
value - The new value for MaxDataDistance

getMaxDataDistance

public Real getMaxDataDistance()
Get the MaxDataDistance property.

Returns:
The MaxDataDistance