ucar.unidata.view.sounding
Class WindStaff

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.CompositeDisplayable
          extended by ucar.unidata.view.sounding.WindProfile
              extended by ucar.unidata.view.sounding.WindStaff

public class WindStaff
extends WindProfile

Provides support for the display of a wind profile as a collection of wind arrows.

Version:
$Id: WindStaff.java,v 1.28 2006/05/02 14:54:27 dmurray Exp $
Author:
Steven R. Emmerson

Nested Class Summary
protected  class WindStaff.ArrowMapSetListener
          Provides support for observing changes in the set of ScalarMap-s of a WindArrow.
protected  class WindStaff.ArrowWindListener
          Provides support for observing changes in the "wind" property of a WindArrow.
 
Field Summary
 
Fields inherited from class ucar.unidata.view.sounding.WindProfile
DIRECTION, GEOPOTENTIAL_ALTITUDE, GEOPOTENTIAL_ALTITUDE_EXTENT, MAXIMUM_SPEED, PRESSURE, SPEED, WIND_PROFILE
 
Fields inherited from class ucar.visad.display.CompositeDisplayable
cnt, label
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
  WindStaff(LocalDisplay display)
          Constructs from a VisAD display.
  WindStaff(LocalDisplay display, TupleType tupleType)
          Constructs from a VisAD display.
protected WindStaff(WindStaff that)
          Constructs from another instance.
 
Method Summary
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
 boolean equals(Object obj)
          Indicates if this instance is identical to another object.
static RealType getGeopotentialAltitudeRealType()
          Returns the type of the geopotential altitude quantity.
protected  FlatField getMissingWindField()
          Returns an instance of a wind field with no values.
protected  Field getProfile()
          Returns the wind profile.
static RealType getSoutherlyWindRealType()
          Returns the type of the southerly wind quantity.
 RealType getVerticalComponentRealType()
          Returns the type of the vertical component of the profile quantity.
static RealType getWesterlyWindRealType()
          Returns the type of the westerly wind quantity.
 int hashCode()
          Returns the hash code of this instance.
 void setDisplay(LocalDisplay display)
          Associates this instance with a given VisAD display.
 void setOriginalProfile()
          Resets the vertical profile of the horizontal wind to the profile of the last setProfile().
 void setProfile(Field profile)
          Sets the wind profile.
protected  void setWindArrows()
          Sets the wind arrows.
 void setWindLevels(Gridded1DSet levels)
          Set the levels of the wind profile to display.
 
Methods inherited from class ucar.unidata.view.sounding.WindProfile
ensureCartesian, getDirection, getGeopotentialAltitude, getGeopotentialAltitudeExtent, getMaximumSpeed, getPressure, getSpeed, profileChange, setAltitudeExtent, setDirection, setGeopotentialAltitude, setMaximumSpeed, setPressure, setSpeed, setSpeedAndDirection
 
Methods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, debug, destroy, destroyAll, displayableCount, fireListDataContentsChanged, fireListDataIntervalAdded, fireListDataIntervalRemoved, getAnimationSet, getDisplayable, indexOf, iterator, lastDisplayable, myAddDataReferences, myRemoveDataReferences, removeDisplayable, removeDisplayable, removeListDataListener, setAdjustFlow, setColor, setColorPalette, setColorUnit, setConstantPosition, setDisplayable, setDisplayMaster, setDisplayUnit, setLineWidth, setManipulable, setPointMode, setPointSize, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, setVisible, setVisible, setVisible, toFront, toString
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindStaff

public WindStaff(LocalDisplay display)
          throws VisADException,
                 RemoteException
Constructs from a VisAD display.

Parameters:
display - The VisAD display.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindStaff

public WindStaff(LocalDisplay display,
                 TupleType tupleType)
          throws VisADException,
                 RemoteException
Constructs from a VisAD display.

Parameters:
display - The VisAD display.
tupleType - TupleType for arrows
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindStaff

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

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

getMissingWindField

protected FlatField getMissingWindField()
Returns an instance of a wind field with no values.

Overrides:
getMissingWindField in class WindProfile
Returns:
A wind field with no values.

setProfile

public void setProfile(Field profile)
                throws VisADException,
                       RemoteException
Sets the wind profile.

Specified by:
setProfile in class WindProfile
Parameters:
profile - The wind profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setOriginalProfile

public void setOriginalProfile()
                        throws VisADException,
                               RemoteException
Resets the vertical profile of the horizontal wind to the profile of the last setProfile().

Specified by:
setOriginalProfile in class WindProfile
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setDisplay

public void setDisplay(LocalDisplay display)
                throws RemoteException,
                       VisADException
Associates this instance with a given VisAD display. If this instance was previously associated with a VisAD display, then it is first removed from that display. This method fires a PropertyChangeEvent for DISPLAY with the old and new values. This method will not cause this instance to be rendered in the display. This method may be overridden in subclasses; the overriding method should invoke super.setDisplay(display).

Overrides:
setDisplay in class CompositeDisplayable
Parameters:
display - The VisAD display. May not be null.
Throws:
NullPointerException - The display is null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
See Also:
Displayable.removeDataReferences()

getProfile

protected Field getProfile()
Returns the wind profile.

Specified by:
getProfile in class WindProfile
Returns:
The wind profile.

getGeopotentialAltitudeRealType

public static RealType getGeopotentialAltitudeRealType()
                                                throws VisADException
Returns the type of the geopotential altitude quantity.

Returns:
The type of the geopotential altitude quantity.
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.

getWesterlyWindRealType

public static RealType getWesterlyWindRealType()
                                        throws VisADException
Returns the type of the westerly wind quantity.

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

getSoutherlyWindRealType

public static RealType getSoutherlyWindRealType()
                                         throws VisADException
Returns the type of the southerly wind quantity.

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

setWindLevels

public void setWindLevels(Gridded1DSet levels)
                   throws VisADException,
                          RemoteException
Set the levels of the wind profile to display.

Specified by:
setWindLevels in class WindProfile
Parameters:
levels - the set of levels (if null, display all);
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setWindArrows

protected void setWindArrows()
                      throws RemoteException,
                             VisADException
Sets the wind arrows.

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 WindProfile
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 WindProfile
Returns:
The hash code of this instance.

cloneForDisplay

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

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