Package ucar.unidata.view.sounding
Class Hodograph3DDisplay
java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.sounding.WindProfileDisplay
ucar.unidata.view.sounding.Hodograph3DDisplay
Provides support for displaying a 3D wind hodograph.
- Version:
- $Id: Hodograph3DDisplay.java,v 1.25 2005/05/13 18:33:30 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
ConstructorsConstructorDescriptionDefault constructor.Hodograph3DDisplay
(Real minZ, Real maxZ, Real maxW) Constructs with given altitude extent and maximum wind speed. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Handles a change to the extent of the displayed altitude.static Real
Returns the default, maximum displayed wind speed.Returns the maximum, displayed, wind speed.Returns the maximum profile wind speed.Returns the speed increment between rings.Returns the set of ring speeds.Returns the displayed, speed unit.boolean
Get the state of automatic speed-scaling.static void
Tests this class.protected Displayable
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
Constructs the displayable WindProfile appropriate to this WindProfileDisplay.void
setAutoscaleSpeed
(boolean value) Toggle automatic speed-scaling.void
setBackgroundVisible
(boolean b) Display or hide the backgroundprotected void
Sets the extent of the center polevoid
setCenterPoleVisible
(boolean visible) Sets the visiblity of the center pole.void
setCompassLabelsVisible
(boolean visible) Sets the visiblity of the compass labels.protected void
Sets the cross hairs.void
setCrossHairsVisible
(boolean visible) Sets the visiblity of the cross hairs.protected void
setCursorPosition
(double[] position) Sets the cursor position.protected void
Sets the displayed altitudes.protected void
setDisplayAltitudes
(Gridded1DSet altitudes) Sets the displayed altitudes.void
setIntermediateRingsVisible
(boolean visible) Sets the visiblity of the intermediate-level rings.protected void
Sets the maximum, displayed, wind speed.void
setMaxDisplaySpeed
(Real speed) Sets the maximum, displayed, wind speed from a Real.void
setOriginalProfile
(int index) Resets the original sounding in the specified sounding.protected void
Sets the speed increment between rings.void
setRingIncrement
(Real increment) Sets the speed increment between rings.protected void
Sets the ring speeds.void
setRingSpeeds
(Linear1DSet speeds) Sets the ring speeds from a set of speeds.void
setRingsVisible
(boolean visible) Sets the visiblity of the upper and lower rings.protected void
Sets the speed labels.void
setSpeedLabelsVisible
(boolean visible) Sets the visiblity of the speed labels.protected void
Sets the speed-rings for the background based on the maximum wind speed for the display and the display speed unit.void
setSpeedUnit
(Unit unit) Sets the displayed, speed unit.protected void
Sets the extents of the wind ScalarMap-s.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, 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, resetClipDistance, 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
-
Constructor Details
-
Hodograph3DDisplay
Default constructor. Use default min, max geopotential altitudes and default max wind speed.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
Hodograph3DDisplay
Constructs with given altitude extent and maximum wind speed.- Parameters:
minZ
- The minimum displayed altitude.maxZ
- The maximum displayed altitude.maxW
- The maximum wind speed.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
getDefaultMaxSpeed
Returns the default, maximum displayed wind speed.- Returns:
- The default, maximum displayed wind speed.
- Throws:
VisADException
- VisAD failure.
-
setAutoscaleSpeed
public void setAutoscaleSpeed(boolean value) Toggle automatic speed-scaling. When autoscaling is on, the speed scale will automatically be adjusted when a new profile is set in the display.- Parameters:
value
- Autoscale speed if true, otherwise keep speed scale the same.
-
isAutoscaleSpeed
public boolean isAutoscaleSpeed()Get the state of automatic speed-scaling.- Returns:
- true if automatic speed-scaling is on, otherwise false
-
newWindProfile
Constructs the displayable WindProfile appropriate to this WindProfileDisplay. Template method.- Specified by:
newWindProfile
in classWindProfileDisplay
- Returns:
- The displayable WindProfile appropriate to this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setBackgroundVisible
Display or hide the background- Overrides:
setBackgroundVisible
in classWindProfileDisplay
- Parameters:
b
- display background if true, otherwise hide the background- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCompassLabelsVisible
Sets the visiblity of the compass labels.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setSpeedLabelsVisible
Sets the visiblity of the speed labels.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCrossHairsVisible
Sets the visiblity of the cross hairs.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setRingsVisible
Sets the visiblity of the upper and lower rings.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setIntermediateRingsVisible
Sets the visiblity of the intermediate-level rings.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCenterPoleVisible
Sets the visiblity of the center pole.- Parameters:
visible
- Whether or not the displayable should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayAltitudes
Sets the displayed altitudes.- Parameters:
altitudes
- The altitudes to display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setWindScalarMapRanges
Sets the extents of the wind ScalarMap-s.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCenterPoleExtent
Sets the extent of the center pole- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayAltitudes
Sets the displayed altitudes.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setRingSpeeds
Sets the ring speeds.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setRingSpeeds
Sets the ring speeds from a set of speeds.- Parameters:
speeds
- The set of speeds for the rings.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getRingSpeeds
Returns the set of ring speeds.- Returns:
- The set of ring speeds.
-
setSpeedRings
Sets the speed-rings for the background based on the maximum wind speed for the display and the display speed unit.- Throws:
VisADException
- necessary VisAD object couldn't be created.RemoteException
- Java RMI Exception
-
setCrossHairs
Sets the cross hairs.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setSpeedLabels
Sets the speed labels.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
displayAltitudeExtentChange
Handles a change to the extent of the displayed altitude.- Specified by:
displayAltitudeExtentChange
in classWindProfileDisplay
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMaxProfileSpeed
Returns the maximum profile wind speed.- Returns:
- The maximum profile wind speed.
-
setOriginalProfile
Resets the original sounding in the specified sounding.- Parameters:
index
- The index of the sounding.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setMaxDisplaySpeed
Sets the maximum, displayed, wind speed.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setMaxDisplaySpeed
Sets the maximum, displayed, wind speed from a Real.- Parameters:
speed
- the new, maximum, displayed, wind speed.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMaxDisplaySpeed
Returns the maximum, displayed, wind speed.- Returns:
- The maximum, displayed, wind speed.
-
setRingIncrement
Sets the speed increment between rings.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setRingIncrement
Sets the speed increment between rings.- Parameters:
increment
- The speed increment between rings.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getRingIncrement
Returns the speed increment between rings.- Returns:
- The increment between rings.
-
setSpeedUnit
Sets the displayed, speed unit.- Parameters:
unit
- The displayed, speed unit.- Throws:
UnitException
- Argument has invalid unit.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getSpeedUnit
Returns the displayed, speed unit.- Returns:
- The displayed, speed unit.
-
setCursorPosition
Sets the cursor position.- Specified by:
setCursorPosition
in classWindProfileDisplay
- Parameters:
position
- The (speed,direction,altitude) cursor position- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
newMeanWind
Returns a MeanWind Displayable corresponding to a mean-wind Tuple.- Specified by:
newMeanWind
in classWindProfileDisplay
- 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
Returns a MeanWind Displayable corresponding to a data reference for a mean-wind Tuple.- Specified by:
newMeanWind
in classWindProfileDisplay
- 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
Returns the MeanWind Displayable with a missing mean-wind.- Specified by:
newMeanWind
in classWindProfileDisplay
- Returns:
- The MeanWind Displayable with a missing mean-wind.
-
main
Tests this class.- Parameters:
args
- Test arguments. Ignored.- Throws:
Exception
- Something went wrong.
-