Package ucar.unidata.view.sounding
Class WindProfileDisplay
java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.sounding.WindProfileDisplay
- Direct Known Subclasses:
Hodograph3DDisplay
,WindStaffDisplay
Provides support for displaying vertical profiles of the horizontal wind.
- Version:
- $Id: WindProfileDisplay.java,v 1.27 2005/05/13 18:33:41 jeffmc Exp $
- Author:
- Don Murray, Steven R. Emmerson
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
The name of the active mean-wind property.static String
The name of the active profile property.static String
The name of the geopotential altitude property.static String
The name of the profile wind-direction property.static String
The name of the profile wind-speed property.Fields inherited from class ucar.visad.display.DisplayMaster
behavior, defaultMouseFunctions, log_, POINT_MODE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
WindProfileDisplay
(DisplayImpl displayImpl, Real minZ, Real maxZ, int displayableCount, DisplayRealType verticalDisplayRealType) Constructs with limits on min and max geopotential altitudes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfile
(int index, Field field) Adds a wind profile.void
clear()
Clears the wind data.protected double
computeIncrement
(double extent, int maxCount) Computes the increment for displaying an extent.protected abstract void
Handles a change to the extent of the displayed altitudes.Returns the displayed, altitude unit.double[]
Returns the cursor position.protected static Real
Returns the default, maximum altitude.protected static Real
Returns the default, minimum altitude.Returns the geopotential altitude property.Returns the maximum, display altitude.Returns the maximum profile altitude.Returns the minimum, display altitude.Returns the minimum profile altitude.protected Real
Returns the profile-wind-direction property.protected Real
Returns the profile-wind-speed property.Gets the currently active wind profile.protected WindProfileSet
Returns the set of wind profiles.boolean
Gets the state of automatic altitude-scaling.protected abstract Displayable
Returns the MeanWind Displayable with a missing mean-wind.protected abstract Displayable
newMeanWind
(DataReference meanWindRef) Returns a MeanWind Displayable corresponding to a mean-wind Tuple.protected abstract Displayable
newMeanWind
(Tuple meanWind) Returns a MeanWind Displayable corresponding to a mean-wind Tuple.protected abstract WindProfile
Creates the displayable WindProfile appropriate to this instance.void
removeMeanWind
(int index) Removes a given mean-wind.void
removeProfile
(int index) Removes a given wind profile.void
setActiveMeanWind
(int index) Sets the active mean-wind.void
setActiveWindProfile
(int index) Sets the active wind profile.protected void
Scales the altitude-color ScalarMap.protected void
Scales the altitude ScalarMap.void
setAltitudeScaleVisible
(boolean visible) Sets the visiblity of the altitude scale.void
setAltitudeUnit
(Unit geoAltUnit) Sets the displayed, altitude unit.void
setAutoscaleAltitude
(boolean value) Toggles automatic altitude-scaling.void
setBackgroundVisible
(boolean b) Display or hide the backgroundprotected abstract void
setCursorPosition
(double[] position) Sets the cursor position.protected void
Sets the extent of the displayed altitudes.void
setDisplayAltitudeExtent
(RealTuple extent) Sets the extent of the displayed altitudes.void
setGeopotentialAltitude
(Real geoAlt) Sets the geopotential altitude property.void
setMeanWind
(int index, DataReference meanWindRef) Sets the mean wind.void
setMeanWind
(int index, Tuple meanWind) Sets the mean wind.void
setMeanWindVisible
(int index, boolean visible) Sets the visibility of a given mean wind.void
setProfileVisible
(int index, boolean visible) Sets the visibility of a given wind profile.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
-
Field Details
-
GEOPOTENTIAL_ALTITUDE
The name of the geopotential altitude property. -
PROFILE_SPEED
The name of the profile wind-speed property. -
PROFILE_DIRECTION
The name of the profile wind-direction property. -
ACTIVE_PROFILE
The name of the active profile property. -
ACTIVE_MEAN_WIND
The name of the active mean-wind property.
-
-
Constructor Details
-
WindProfileDisplay
protected WindProfileDisplay(DisplayImpl displayImpl, Real minZ, Real maxZ, int displayableCount, DisplayRealType verticalDisplayRealType) throws VisADException, RemoteException Constructs with limits on min and max geopotential altitudes.- Parameters:
displayImpl
- The VisAD display.minZ
- The minimum altitude.maxZ
- The maximum altitude.displayableCount
- The anticipated numer of Displayable-s.verticalDisplayRealType
- The type of the display vertical dimension.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
getDefaultMinAltitude
Returns the default, minimum altitude.- Returns:
- The default, minimum altitude.
-
getDefaultMaxAltitude
Returns the default, maximum altitude.- Returns:
- The default, maximum altitude.
-
getWindProfileSet
Returns the set of wind profiles.- Returns:
- The set of wind profiles.
-
setAutoscaleAltitude
public void setAutoscaleAltitude(boolean value) Toggles automatic altitude-scaling. When autoscaling is on, the altitude scale will automatically be adjusted when a new profile is set in the display.- Parameters:
value
- Autoscale altitude if true, otherwise keep altitude scale the same.
-
isAutoscaleAltitude
public boolean isAutoscaleAltitude()Gets the state of automatic altitude-scaling.- Returns:
- true if automatic altitude-scaling is on, otherwise false
-
addProfile
Adds a wind profile. The profile will be inserted at the given index. The profile will be invisible.- Parameters:
index
- The index of the profile.field
- The wind profile.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeProfile
public void removeProfile(int index) throws IndexOutOfBoundsException, RemoteException, VisADException Removes a given wind profile.- Parameters:
index
- The index of the profile to be removed.- Throws:
IndexOutOfBoundsException
- The index was out of range.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setActiveWindProfile
Sets the active wind profile.- Parameters:
index
- The index of the active wind profile.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setProfileVisible
Sets the visibility of a given wind profile.- Parameters:
index
- The wind profile index.visible
- Whether or not the wind profile is to be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
newWindProfile
Creates the displayable WindProfile appropriate to this instance. This is a template method.- Returns:
- The displayable WindProfile appropriate to this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getWindProfile
Gets the currently active wind profile. The function type of the returned profile is a CartesianHorizontalWindOfGeopotentialAltitude.- Returns:
- wind profile
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
setMeanWind
Sets the mean wind.- Parameters:
index
- Which mean wind.meanWind
- The mean wind.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setMeanWind
public void setMeanWind(int index, DataReference meanWindRef) throws VisADException, RemoteException Sets the mean wind.- Parameters:
index
- The index of the mean wind.meanWindRef
- The data reference for the mean wind.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeMeanWind
public void removeMeanWind(int index) throws IndexOutOfBoundsException, VisADException, RemoteException Removes a given mean-wind.- Parameters:
index
- The index of the mean-wind to be removed.- Throws:
IndexOutOfBoundsException
- The index was out of range.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setMeanWindVisible
Sets the visibility of a given mean wind.- Parameters:
index
- The index of the mean wind.visible
- Whether or not the mean wind is to be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setActiveMeanWind
Sets the active mean-wind.- Parameters:
index
- The index of the active mean-wind.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
clear
Clears the wind data.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMinProfileAltitude
Returns the minimum profile altitude.- Returns:
- The minimum profile altitude.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMaxProfileAltitude
Returns the maximum profile altitude.- Returns:
- The maximum profile altitude.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setGeopotentialAltitude
Sets the geopotential altitude property.- Parameters:
geoAlt
- The new value.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getGeopotentialAltitude
Returns the geopotential altitude property.- Returns:
- The geopotential altitude property.
-
getProfileSpeed
Returns the profile-wind-speed property.- Returns:
- The profile-wind-speed property.
-
getProfileDirection
Returns the profile-wind-direction property.- Returns:
- The profile-wind-direction property.
-
setBackgroundVisible
Display or hide the background- Parameters:
b
- display background if true, otherwise hide the background- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setAltitudeScaleVisible
Sets the visiblity of the altitude scale.- Parameters:
visible
- Whether or not the altitude scale should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
computeIncrement
protected double computeIncrement(double extent, int maxCount) Computes the increment for displaying an extent.- Parameters:
extent
- The extent.maxCount
- The maximum number of intervals.- Returns:
- The increment for displaying the extent.
-
setAltitudeMapRange
Scales the altitude ScalarMap.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setAltitudeColorMapRange
Scales the altitude-color ScalarMap.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayAltitudeExtent
Sets the extent of the displayed altitudes.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayAltitudeExtent
Sets the extent of the displayed altitudes.- Parameters:
extent
- The extent of the displayed altitudes.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
displayAltitudeExtentChange
Handles a change to the extent of the displayed altitudes.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMinDisplayAltitude
Returns the minimum, display altitude.- Returns:
- The minimum, display altitude.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMaxDisplayAltitude
Returns the maximum, display altitude.- Returns:
- The maximum, display altitude.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setAltitudeUnit
Sets the displayed, altitude unit.- Parameters:
geoAltUnit
- The displayed, altitude unit.- Throws:
UnitException
- Argument has incompatible unit.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getAltitudeUnit
Returns the displayed, altitude unit.- Returns:
- The displayed, altitude unit.
-
setCursorPosition
Sets the cursor position.- Parameters:
position
- The cursor position.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getCursorPosition
public double[] getCursorPosition()Returns the cursor position.- Returns:
- The cursor position.
-
newMeanWind
Returns a MeanWind Displayable corresponding to a mean-wind Tuple.- 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 abstract Displayable newMeanWind(DataReference meanWindRef) throws VisADException, RemoteException Returns a MeanWind Displayable corresponding to a mean-wind Tuple.- 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.- Returns:
- The MeanWind Displayable with a missing mean-wind.
-