ucar.unidata.view.sounding
Class WindStaffDisplay

java.lang.Object
  extended by ucar.visad.display.DisplayMaster
      extended by ucar.unidata.view.sounding.WindProfileDisplay
          extended by ucar.unidata.view.sounding.WindStaffDisplay

public class WindStaffDisplay
extends WindProfileDisplay

Provides support for a display comprising a wind staff.

Version:
$Id: WindStaffDisplay.java,v 1.21 2005/05/13 18:33:42 jeffmc Exp $
Author:
Don Murray, Steven R. Emmerson

Field Summary
 
Fields inherited from class ucar.unidata.view.sounding.WindProfileDisplay
ACTIVE_MEAN_WIND, ACTIVE_PROFILE, GEOPOTENTIAL_ALTITUDE, PROFILE_DIRECTION, PROFILE_SPEED
 
Fields inherited from class ucar.visad.display.DisplayMaster
behavior, defaultMouseFunctions, log_, POINT_MODE
 
Constructor Summary
WindStaffDisplay()
          Constructs from nothing.
WindStaffDisplay(Real minZ, Real maxZ)
          Constructs with a given altitude extent.
 
Method Summary
protected  void addScalarMaps()
          Adds the set of ScalarMap-s specific to this instance.
protected  void displayAltitudeExtentChange()
          Handles a change to the displayed altitude extent
static void main(String[] args)
          Tests this class.
protected  Displayable newMeanWind()
          Returns the MeanWind Displayable with a missing mean-wind.
protected  Displayable newMeanWind(DataReference meanWindRef)
          Returns a MeanWind Displayable corresponding to a data reference for a mean-wind Tuple.
protected  Displayable newMeanWind(Tuple meanWind)
          Returns a MeanWind Displayable corresponding to a mean-wind Tuple.
protected  WindProfile newWindProfile()
          Returns the displayable WindProfile appropriate to this instance.
 void setBackgroundVisible(boolean visable)
          Display or hide the background
protected  void setCenterPoleExtent()
          Sets the extent of the center pole.
 void setCenterPoleVisible(boolean visible)
          Sets the visibility of the center pole.
protected  void setCursorPosition(double[] position)
          Sets the cursor position.
 
Methods inherited from class ucar.unidata.view.sounding.WindProfileDisplay
addProfile, clear, computeIncrement, getAltitudeUnit, getCursorPosition, getDefaultMaxAltitude, getDefaultMinAltitude, getGeopotentialAltitude, getMaxDisplayAltitude, getMaxProfileAltitude, getMinDisplayAltitude, getMinProfileAltitude, getProfileDirection, getProfileSpeed, getWindProfile, getWindProfileSet, isAutoscaleAltitude, removeMeanWind, removeProfile, setActiveMeanWind, setActiveWindProfile, setAltitudeColorMapRange, setAltitudeMapRange, setAltitudeScaleVisible, setAltitudeUnit, setAutoscaleAltitude, setDisplayAltitudeExtent, setDisplayAltitudeExtent, setGeopotentialAltitude, setMeanWind, setMeanWind, setMeanWindVisible, setProfileVisible
 
Methods inherited from class ucar.visad.display.DisplayMaster
addDisplayable, addDisplayListener, addKeyboardBehavior, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, destroy, draw, ensureInactive, equals, finalize, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getRotation, getSavedProjectionMatrix, getScale, getScreenBounds, getStereoAvailable, getWaitMessageVisible, handleMouseWheelMoved, hashCode, indexOf, init, is3D, isActive, isPointMode, printMatrix, printMe, rebuild, rebuildDisplay, reDisplayAll, removeDisplayable, removeDisplayables, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, removeScalarMaps, removeVetoableChangeListener, removeVetoableChangeListener, replaceScalarMap, reScale, resetMouseFunctions, resetProjection, rotate, rotateX, rotateY, rotateZ, saveCurrentDisplay, saveCurrentDisplay, saveCurrentDisplay, saveProjection, setActive, setAnimation, setAnimationStringVisible, setBackground, setDefaultMouseFunctions, setDisplayables, setDisplayables, setDisplayActive, setDisplayAspect, setDisplayInactive, setEyePosition, setForeground, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindStaffDisplay

public WindStaffDisplay()
                 throws VisADException,
                        RemoteException
Constructs from nothing. Uses default min, max geopotential altitudes.

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

WindStaffDisplay

public WindStaffDisplay(Real minZ,
                        Real maxZ)
                 throws VisADException,
                        RemoteException
Constructs with a given altitude extent.

Parameters:
minZ - The minimum geopotential altitude.
maxZ - The maximum geopotential altitude.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

newWindProfile

protected WindProfile newWindProfile()
                              throws VisADException,
                                     RemoteException
Returns the displayable WindProfile appropriate to this instance. This is a template method.

Specified by:
newWindProfile in class WindProfileDisplay
Returns:
The displayable WindProfile appropriate to this instance.
Throws:
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

addScalarMaps

protected void addScalarMaps()
                      throws VisADException
Adds the set of ScalarMap-s specific to this instance.

Throws:
VisADException - VisAD failure.

displayAltitudeExtentChange

protected void displayAltitudeExtentChange()
                                    throws VisADException,
                                           RemoteException
Handles a change to the displayed altitude extent

Specified by:
displayAltitudeExtentChange in class WindProfileDisplay
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setCenterPoleExtent

protected void setCenterPoleExtent()
                            throws RemoteException,
                                   VisADException
Sets the extent of the center pole.

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

setCursorPosition

protected void setCursorPosition(double[] position)
                          throws VisADException,
                                 RemoteException
Sets the cursor position.

Specified by:
setCursorPosition in class WindProfileDisplay
Parameters:
position - The cursor position.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setBackgroundVisible

public void setBackgroundVisible(boolean visable)
                          throws VisADException,
                                 RemoteException
Display or hide the background

Overrides:
setBackgroundVisible in class WindProfileDisplay
Parameters:
visable - Display background if true, otherwise hide the background
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setCenterPoleVisible

public void setCenterPoleVisible(boolean visible)
                          throws VisADException,
                                 RemoteException
Sets the visibility of the center pole.

Parameters:
visible - Whether or not the center pole should be visible.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

newMeanWind

protected Displayable newMeanWind(Tuple meanWind)
                           throws VisADException,
                                  RemoteException
Returns a MeanWind Displayable corresponding to a mean-wind Tuple.

Specified by:
newMeanWind in class WindProfileDisplay
Parameters:
meanWind - the mean-wind Tuple
Returns:
The MeanWind Displayable corresponding to the input mean-wind.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

newMeanWind

protected Displayable newMeanWind(DataReference meanWindRef)
                           throws VisADException,
                                  RemoteException
Returns a MeanWind Displayable corresponding to a data reference for a mean-wind Tuple.

Specified by:
newMeanWind in class WindProfileDisplay
Parameters:
meanWindRef - The data reference for the mean-wind Tuple.
Returns:
The MeanWind Displayable corresponding to the input mean-wind.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

newMeanWind

protected Displayable newMeanWind()
Returns the MeanWind Displayable with a missing mean-wind.

Specified by:
newMeanWind in class WindProfileDisplay
Returns:
The MeanWind Displayable with a missing mean-wind.

main

public static void main(String[] args)
                 throws Exception
Tests this class.

Parameters:
args - Test arguments. Ignored.
Throws:
Exception - Something went wrong.