ucar.unidata.view.sounding
Class WindArrow

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.LineDrawing
              extended by ucar.unidata.view.sounding.WindArrow

public class WindArrow
extends LineDrawing

Supports the display a horizontal wind as a wind-direction shaft with barbs. The VisAD MathType of the horizontal wind is the TupleType (GeopotentialAltitude, (WesterlyWind, SoutherlyWind)).

Version:
$Id: WindArrow.java,v 1.21 2005/05/13 18:33:40 jeffmc Exp $
Author:
Steven R. Emmerson

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
 
Field Summary
static String WIND
          The name of the wind property.
 
Fields inherited from class ucar.visad.display.LineDrawing
COLOR, LINE_STYLE, LINE_WIDTH, POINT_SIZE
 
Fields inherited from class ucar.visad.display.DisplayableData
MANIPULABLE, renderer, VISIBLE
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
  WindArrow()
          Constructs from nothing.
  WindArrow(TupleType tupleType)
          Constructs from the TupleType for the data.
  WindArrow(TupleType tupleType, boolean manip)
          Constructs from the TupleType for the data.
protected WindArrow(WindArrow that)
          Constructs from another instance.
 
Method Summary
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
protected  void dataChange()
          Handles a change to the Data referenced by this displayable's DataReference.
 boolean equals(Object obj)
          Indicates if this instance is identical to another object.
protected  DataRenderer getDataRenderer()
          Returns the DataRenderer for this displayable.
static TupleType getDefaultTupleType()
          Returns the default type of the wind tuple.
static RealType getGeopotentialAltitudeDefaultRealType()
          Returns the default type of the geopotential altitude.
static RealTupleType getHorizontalWindDefaultRealTupleType()
          Returns the default type of the horizontal wind.
static RealType getSoutherlyWindDefaultRealType()
          Returns the default type of the southerly wind.
 TupleType getTupleType()
          Returns the MathType of the wind tuple.
 RealType getVerticalComponentRealType()
          Returns the type of the vertical component of the profile quantity.
static RealType getWesterlyWindDefaultRealType()
          Returns the default type of the westerly wind.
 Tuple getWind()
          Returns the wind.
 int hashCode()
          Returns the hash code of this instance.
 void setWind(DataReference windRef)
          Sets the wind.
 void setWind(Tuple wind)
          Sets the wind.
 String toString()
          Returns a String representation of this WindArrow
 
Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setPointSize, setRGB, setRGB, setRGBA, setRGBA
 
Methods inherited from class ucar.visad.display.DisplayableData
addAction, destroy, getActive, getAnimationSet, getData, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, showme
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WIND

public static String WIND
The name of the wind property.

Constructor Detail

WindArrow

public WindArrow()
          throws VisADException,
                 RemoteException
Constructs from nothing. The TupleType will be the default. The data will be manipulable.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindArrow

public WindArrow(TupleType tupleType)
          throws VisADException,
                 RemoteException
Constructs from the TupleType for the data. The data will be manipulable.

Parameters:
tupleType - The MathType for the data.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindArrow

public WindArrow(TupleType tupleType,
                 boolean manip)
          throws VisADException,
                 RemoteException
Constructs from the TupleType for the data. The data will be manipulable depending on the value of manip.

Parameters:
tupleType - The MathType for the data.
manip - if true, will be manipulable
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindArrow

protected WindArrow(WindArrow that)
             throws VisADException,
                    RemoteException
Constructs from another instance.

Parameters:
that - The other instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

getDefaultTupleType

public static TupleType getDefaultTupleType()
Returns the default type of the wind tuple.

Returns:
The default type of the wind tuple.

getGeopotentialAltitudeDefaultRealType

public static RealType getGeopotentialAltitudeDefaultRealType()
                                                       throws VisADException
Returns the default type of the geopotential altitude.

Returns:
The default type of the geopotential altitude.
Throws:
VisADException - VisAD failure.

getVerticalComponentRealType

public RealType getVerticalComponentRealType()
                                      throws VisADException
Returns the type of the vertical component of the profile quantity.

Returns:
The type of the vertical quantity.
Throws:
VisADException - VisAD failure.

getHorizontalWindDefaultRealTupleType

public static RealTupleType getHorizontalWindDefaultRealTupleType()
                                                           throws VisADException
Returns the default type of the horizontal wind.

Returns:
The default type of the horizontal wind.
Throws:
VisADException - VisAD failure.

getWesterlyWindDefaultRealType

public static RealType getWesterlyWindDefaultRealType()
                                               throws VisADException
Returns the default type of the westerly wind.

Returns:
The default type of the westerly wind.
Throws:
VisADException - VisAD failure.

getSoutherlyWindDefaultRealType

public static RealType getSoutherlyWindDefaultRealType()
                                                throws VisADException
Returns the default type of the southerly wind.

Returns:
The default type of the southerly wind.
Throws:
VisADException - VisAD failure.

getTupleType

public TupleType getTupleType()
Returns the MathType of the wind tuple.

Returns:
The MathType of the wind tuple.

setWind

public void setWind(Tuple wind)
             throws VisADException,
                    RemoteException
Sets the wind.

Parameters:
wind - The horizontal wind (geopotentialAltitude, (u, v)).
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setWind

public void setWind(DataReference windRef)
             throws VisADException,
                    RemoteException
Sets the wind.

Parameters:
windRef - The data reference for the horizontal wind (geopotentialAltitude, (u, v)).
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getWind

public Tuple getWind()
              throws VisADException,
                     RemoteException
Returns the wind.

Returns:
The horizontal wind.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

dataChange

protected void dataChange()
                   throws VisADException,
                          RemoteException
Handles a change to the Data referenced by this displayable's DataReference.

Overrides:
dataChange in class DisplayableData
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

equals

public boolean equals(Object obj)
Indicates if this instance is identical to another object.

Overrides:
equals in class Object
Parameters:
obj - The other object.
Returns:
true if and only if this instance is identical to the other object.

hashCode

public int hashCode()
Returns the hash code of this instance.

Overrides:
hashCode in class Object
Returns:
The hash code of this instance.

cloneForDisplay

public Displayable cloneForDisplay()
                            throws VisADException,
                                   RemoteException
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.

Overrides:
cloneForDisplay in class DisplayableData
Returns:
A clone of this instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getDataRenderer

protected DataRenderer getDataRenderer()
Returns the DataRenderer for this displayable. This method does not verify that the VisAD display has been set.

Overrides:
getDataRenderer in class DisplayableData
Returns:
The DataRenderer associated with this displayable.

toString

public String toString()
Returns a String representation of this WindArrow

Overrides:
toString in class DisplayableData
Returns:
string representing this WindArrow