Package ucar.unidata.view.sounding
Class AerologicalDisplay
java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.sounding.AerologicalDisplay
- All Implemented Interfaces:
AerologicalDisplayConstants
- Direct Known Subclasses:
SkewTDisplay
,StuveDisplay
Provides a 2-D VisAD display for an aerological ( meteorological
thermodynamic) diagram.
- Version:
- $Id: AerologicalDisplay.java,v 1.53 2007/01/30 22:46:00 dmurray Exp $
- Author:
- Unidata Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Provides support for displaying the trajectory of a lifted parcel.protected static class
Provides support for the left pressure-axis labels.protected static class
Provides support for the lower temperature labels.protected class
Provides support for calculating the saturated portion of a lifted parcel's trajectory.protected class
Provides support for creating calculators of the saturated portion of a lifted parcel's trajectory.protected class
Internal class for displaying a wind staffprotected static class
Provides support for labels for the pressure axis.protected static class
Provides support for the left pressure-axis labels.protected static class
Provides support for labels on the temperature axis.protected static class
Provides support for the lower temperature labels. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the active sounding property.static final String
The name of the active wind profile property.static final String
The name of the CAPE property.static final String
The name of the VisAD-cursor pressure property.static final String
The name of the VisAD-cursor temperature property.static final String
The name of the mouse-pointer pressure property.static final String
The name of the mouse-pointer temperature property.static final String
The name of the profile dew-point property.static final String
The name of the profile temperature property.static final String
The name of the profile wind direction property.static final String
The name of the profile wind speed property.Fields inherited from class ucar.visad.display.DisplayMaster
behavior, defaultMouseFunctions, log_, POINT_MODE
Fields inherited from interface ucar.unidata.view.sounding.AerologicalDisplayConstants
EMAGRAM_DISPLAY, HODOGRAPH_DISPLAY, SKEWT_DISPLAY, STUVE_DISPLAY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a new AerologicalDisplay and use the coordinate system for all transformsCreate a new AerologicalDisplay and use the coordinate system for all transformsprotected
AerologicalDisplay
(DisplayImpl display, int initialCapacity, DisplayRealType displayPressureType, DisplayRealType displayTemperatureType, AerologicalCoordinateSystem coordinateSystem) Constructs. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfile
(int index, Field temperature, Field dewPoint, Field windProfile) Adds a temperature, dew-point and wind sounding to the display.void
addProfile
(Field temperature, Field dewPoint) Adds a temperature and dew-point sounding to the display.void
addProfile
(Field temperature, Field dewPoint, Field windProfile) Adds a temperature, dew-point, and wind sounding to the display.void
Removes all soundings from the display.void
Clears the pseudo-adiabatic-trajectory property.protected void
Handle a change to the coordinate system.Get the active sounding.int
Get the barb orientation being used (NH or SH style).int
Get the barb scalingGets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.Gets the VisAD-cursor pressure property.Gets the cursor temperature property.boolean
Get the visibility of the background dry adiabats.static AerologicalDisplay
getInstance
(String type) Create a new AerologicalDisplay of the given typestatic AerologicalDisplay
getInstance
(String type, GraphicsConfiguration gc) Create a new AerologicalDisplay of the given typestatic AerologicalDisplay
Create a new AerologicalDisplay with the specified CoordinateSystemboolean
_more_Returns the maximum pressure of this display.Returns the maximum temperature of this display.Returns the minimum pressure of this display.Returns the minimum temperature of this display.Gets the mouse-pointer pressure property.Gets the pointer temperature property.Gets the profile dew-point property.Gets the profile temperature property.Gets the profile wind direction property.Gets the profile wind speed property.boolean
Get the visibility of the background saturation adiabats.boolean
Get the visibility of the background saturation adiabats.boolean
Get the visibility of the wind barb staffprotected void
Initialize the classboolean
Gets the pseudo-adiabatic-trajectory-on property.boolean
Returns the visibility of the pseudoadiabatic trajectory.int
Returns the number of profiles in the display.void
removeProfile
(int index) Removes a given sounding from the display.void
Removes all soundings from the display.void
setActiveSounding
(int index) Sets the "active" sounding.void
setBackgroundLineColor
(Color color) Set the background line colorsvoid
setBarbOrientation
(int orient) Set the barb orientation.void
setBarbScale
(int size) Set the barb scaling.void
setConstrainProfiles
(boolean yes) Sets the constrainProfiles property.void
setCoordinateSystem
(String type) Set the CoordinateSystem for this display to the default for the type.void
Sets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.final void
setCursorPressure
(Real pressure) Sets the VisAD-cursor pressure property.protected final void
setCursorTemperature
(Real temperature) Sets the VisAD-cursor temperature property.protected void
Set up the DisplayScalarMaps for this display.void
setDryAdiabatVisibility
(boolean on) Sets the visibility of the background dry adiabats.void
setForeground
(Color color) Sets the "foreground" color of this VisAD displayvoid
setIsobarsVisibility
(boolean on) _more_void
setLabelColor
(Color color) Set the label colorvoid
setOriginalProfiles
(int index) Resets the original sounding in the specified sounding.final void
setPointerPressure
(Real pressure) Sets the mouse-pointer pressure property.protected final void
setPointerTemperature
(Real temperature) Sets the mouse-pointer temperature property.void
setProfilesVisibility
(boolean visible, int index) Sets the visibility of last two soundings.void
setProfileVisible
(int index, boolean visible) Sets the visibility of a given sounding.void
setPseudoAdiabaticTrajectoryEnabled
(boolean enable) Sets the pseudo-adiabatic-trajectory-on property.void
setPseudoAdiabaticTrajectoryVisible
(boolean visible) Sets the visibility of the pseudoadiabatic trajectory.void
setSaturationAdiabatVisibility
(boolean on) Sets the visibility of the background saturation adiabats.void
setSaturationMixingRatioVisibility
(boolean on) Sets the visibility of the background saturation adiabats.void
setWindColor
(Color color) Set the wind flag colorvoid
setWindLevels
(Gridded1DSet levels) Set the levels of the wind profile to display.void
setWindStaffVisibility
(boolean on) Sets the visibility of the wind barb staff.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, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
-
Field Details
-
CURSOR_PRESSURE
The name of the VisAD-cursor pressure property.- See Also:
-
POINTER_PRESSURE
The name of the mouse-pointer pressure property.- See Also:
-
CURSOR_TEMPERATURE
The name of the VisAD-cursor temperature property.- See Also:
-
POINTER_TEMPERATURE
The name of the mouse-pointer temperature property.- See Also:
-
ACTIVE_SOUNDING
The name of the active sounding property.- See Also:
-
ACTIVE_WIND_PROFILE
The name of the active wind profile property.- See Also:
-
PROFILE_TEMPERATURE
The name of the profile temperature property.- See Also:
-
PROFILE_DEW_POINT
The name of the profile dew-point property.- See Also:
-
PROFILE_WIND_SPEED
The name of the profile wind speed property.- See Also:
-
PROFILE_WIND_DIRECTION
The name of the profile wind direction property.- See Also:
-
CAPE
The name of the CAPE property.- See Also:
-
-
Constructor Details
-
AerologicalDisplay
protected AerologicalDisplay(DisplayImpl display, int initialCapacity, DisplayRealType displayPressureType, DisplayRealType displayTemperatureType, AerologicalCoordinateSystem coordinateSystem) throws VisADException, RemoteException Constructs. The value of the constrainProfiles property is initiallytrue
.- Parameters:
display
- The VisAD display.initialCapacity
- The anticipated number of displayables.displayPressureType
- The display pressure type.displayTemperatureType
- The display temperature type.coordinateSystem
- The (p,T) invalid input: '<'-> (x,y) transformation.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
AerologicalDisplay
Create a new AerologicalDisplay and use the coordinate system for all transforms- Parameters:
acs
- AerologicalCoordinateSystem for transforms- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
AerologicalDisplay
public AerologicalDisplay(AerologicalCoordinateSystem acs, GraphicsConfiguration gc) throws VisADException, RemoteException Create a new AerologicalDisplay and use the coordinate system for all transforms- Parameters:
acs
- AerologicalCoordinateSystem for transformsgc
- GraphicsConfiguration- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
initializeClass
Initialize the class- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayScalarMaps
Set up the DisplayScalarMaps for this display.- Throws:
RemoteException
- Java RMI exceptionVisADException
- VisAD problem
-
getCoordinateSystem
Gets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.- Returns:
- The (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display
-
setCoordinateSystem
Set the CoordinateSystem for this display to the default for the type.- Parameters:
type
- type of display (fromAerologicalDisplayConstants
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCoordinateSystem
public void setCoordinateSystem(AerologicalCoordinateSystem acs) throws VisADException, RemoteException Sets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.- Parameters:
acs
- the new (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating VisAD object
-
coordinateSystemChange
protected void coordinateSystemChange(AerologicalCoordinateSystem acs) throws VisADException, RemoteException Handle a change to the coordinate system.- Parameters:
acs
- the new (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem creating VisAD object
-
addProfile
Adds a temperature and dew-point sounding to the display. The sounding will be added to the end of the set of soundings.- Parameters:
temperature
- The temperature sounding. Must be Pressure -> Temperature.dewPoint
- The dew-point sounding. Must be Pressure -> DewPoint.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addProfile
public void addProfile(Field temperature, Field dewPoint, Field windProfile) throws VisADException, RemoteException Adds a temperature, dew-point, and wind sounding to the display. The sounding will be added to the end of the set of soundings.- Parameters:
temperature
- The temperature sounding. Must be Pressure -> Temperature.dewPoint
- The dew-point sounding. Must be Pressure -> DewPoint.windProfile
- The wind profile. Must be Pressure -> Wind- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addProfile
public void addProfile(int index, Field temperature, Field dewPoint, Field windProfile) throws VisADException, RemoteException Adds a temperature, dew-point and wind sounding to the display. The soundings will be inserted at the given index. The soundings will be invisible.- Parameters:
index
- The index of the sounding.temperature
- The temperature sounding. Must be Pressure -> Temperature.dewPoint
- The dew-point sounding. Must be Pressure -> DewPoint.windProfile
- The wind profile. Must be Pressure -> Wind- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
profileCount
public int profileCount()Returns the number of profiles in the display.- Returns:
- The number of profiles in the display.
-
removeProfiles
Removes all soundings from the display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeProfile
Removes a given sounding from the display. The soundings subsequent to that position will have their indexes decremented by one.- Parameters:
index
- The index of the sounding.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setProfileVisible
Sets the visibility of a given sounding.- Parameters:
index
- The sounding index.visible
- Whether or not the sounding should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setProfilesVisibility
public void setProfilesVisibility(boolean visible, int index) throws VisADException, RemoteException Sets the visibility of last two soundings.- Parameters:
visible
- Whether or not the sounding should be visible.index
- _more_- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setActiveSounding
Sets the "active" sounding. This is necessary for determining the trajectory of a lifted parcel, for example.- Parameters:
index
- The index of the "active" sounding. A value of -1 means that there is no active sounding.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setOriginalProfiles
Resets the original sounding in the specified sounding.- Parameters:
index
- The index of the sounding.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
clearProfiles
Removes all soundings from the display.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setConstrainProfiles
Sets the constrainProfiles property. When this property is set, profile temperatures are constrained to be equal to or greater than their corresponding profile dew-points.- Parameters:
yes
- Whether or not to constrain temperatures to be equal to or greater than corresponding dew-points.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setCursorPressure
public final void setCursorPressure(Real pressure) throws UnitException, VisADException, RemoteException Sets the VisAD-cursor pressure property.- Parameters:
pressure
- The pressure at the VisAD cursor.- Throws:
UnitException
- Inappropriate pressure unit.VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
setPointerPressure
public final void setPointerPressure(Real pressure) throws UnitException, VisADException, RemoteException Sets the mouse-pointer pressure property.- Parameters:
pressure
- The pressure at the mouse pointer.- Throws:
UnitException
- Inappropriate pressure unit.VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
getCursorPressure
Gets the VisAD-cursor pressure property.- Returns:
- The pressure at the VisAD cursor. May be
null
.
-
getPointerPressure
Gets the mouse-pointer pressure property.- Returns:
- The pressure at the mouse pointer. May be
null
.
-
setCursorTemperature
protected final void setCursorTemperature(Real temperature) throws UnitException, VisADException, RemoteException Sets the VisAD-cursor temperature property.- Parameters:
temperature
- The cursor temperature.- Throws:
UnitException
- Inappropriate unit.VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
setPointerTemperature
protected final void setPointerTemperature(Real temperature) throws UnitException, VisADException, RemoteException Sets the mouse-pointer temperature property.- Parameters:
temperature
- The pointer temperature.- Throws:
UnitException
- Inappropriate unit.VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
getCursorTemperature
Gets the cursor temperature property.- Returns:
- The currently-selected temperature. May be
null
.
-
getPointerTemperature
Gets the pointer temperature property.- Returns:
- The temperature under the mouse pointer. May be
null
.
-
getProfileTemperature
Gets the profile temperature property.- Returns:
- The profile temperature. May be
null
.
-
getProfileDewPoint
Gets the profile dew-point property.- Returns:
- The profile dew-point. May be
null
.
-
getProfileWindSpeed
Gets the profile wind speed property.- Returns:
- The profile wind speed. May be
null
.
-
getProfileWindDirection
Gets the profile wind direction property.- Returns:
- The profile wind direction. May be
null
.
-
setPseudoAdiabaticTrajectoryEnabled
public void setPseudoAdiabaticTrajectoryEnabled(boolean enable) throws VisADException, RemoteException Sets the pseudo-adiabatic-trajectory-on property. An active sounding must also be set in order to compute the trajectory.- Parameters:
enable
- Whether or not showing of the pseudo adiabatic trajectory is enabled.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
isPseudoAdiabaticTrajectoryEnabled
public boolean isPseudoAdiabaticTrajectoryEnabled()Gets the pseudo-adiabatic-trajectory-on property.- Returns:
- Whether or not showing the pseudo adiabatic trajectory is enabled.
-
setPseudoAdiabaticTrajectoryVisible
public void setPseudoAdiabaticTrajectoryVisible(boolean visible) throws VisADException, RemoteException Sets the visibility of the pseudoadiabatic trajectory.- Parameters:
visible
- If and only iftrue
, then the trajectory will be visible if it exists.- Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
isPseudoAdiabaticTrajectoryVisible
public boolean isPseudoAdiabaticTrajectoryVisible()Returns the visibility of the pseudoadiabatic trajectory.- Returns:
- True if and only if the trajectory will be visible if it exists.
-
clearPseudoAdiabaticTrajectory
Clears the pseudo-adiabatic-trajectory property.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMinimumPressure
Returns the minimum pressure of this display.- Returns:
- The minimum pressure of this display.
-
getMaximumPressure
Returns the maximum pressure of this display.- Returns:
- The maximum pressure of this display.
-
getMinimumTemperature
Returns the minimum temperature of this display.- Returns:
- The minimum temperature of this display.
-
getMaximumTemperature
Returns the maximum temperature of this display.- Returns:
- The maximum temperature of this display.
-
setDryAdiabatVisibility
Sets the visibility of the background dry adiabats.- Parameters:
on
- Whether the background dry adiabats should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setIsobarsVisibility
_more_- Parameters:
on
- _more_- Throws:
RemoteException
- _more_VisADException
- _more_
-
getDryAdiabatVisibility
public boolean getDryAdiabatVisibility()Get the visibility of the background dry adiabats.- Returns:
- true if visible
-
getIsoBarsVisibility
public boolean getIsoBarsVisibility()_more_- Returns:
- _more_
-
setSaturationAdiabatVisibility
Sets the visibility of the background saturation adiabats.- Parameters:
on
- Whether the background saturation adiabats should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getSaturationAdiabatVisibility
public boolean getSaturationAdiabatVisibility()Get the visibility of the background saturation adiabats.- Returns:
- true if visible
-
setWindStaffVisibility
Sets the visibility of the wind barb staff.- Parameters:
on
- Whether the wind barb staff should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getWindStaffVisibility
public boolean getWindStaffVisibility()Get the visibility of the wind barb staff- Returns:
- true if visible
-
setWindLevels
Set the levels of the wind profile to display.- Parameters:
levels
- the set of levels (if null, display all);- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setSaturationMixingRatioVisibility
Sets the visibility of the background saturation adiabats.- Parameters:
on
- Whether the background saturation adiabats should be visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getSaturationMixingRatioVisibility
public boolean getSaturationMixingRatioVisibility()Get the visibility of the background saturation adiabats.- Returns:
- true if visible
-
setBarbOrientation
public void setBarbOrientation(int orient) Set the barb orientation.- Parameters:
orient
- orientation.
-
getBarbOrientation
public int getBarbOrientation()Get the barb orientation being used (NH or SH style).- Returns:
- orientation ( FlowControl.NH_ORIENTATION or FlowControl.SH_ORIENTATION)
-
setBarbScale
public void setBarbScale(int size) Set the barb scaling.- Parameters:
size
- scaling of barbs (2 = default);
-
getBarbScale
public int getBarbScale()Get the barb scaling- Returns:
- scaling
-
getInstance
Create a new AerologicalDisplay of the given type- Parameters:
type
- type of display (fromAerologicalDisplayConstants
- Returns:
- a new AerologicalDisplay of the given type
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getInstance
public static AerologicalDisplay getInstance(String type, GraphicsConfiguration gc) throws VisADException, RemoteException Create a new AerologicalDisplay of the given type- Parameters:
type
- type of display (fromAerologicalDisplayConstants
gc
- GraphicsConfiguration- Returns:
- a new AerologicalDisplay of the given type
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getInstance
public static AerologicalDisplay getInstance(AerologicalCoordinateSystem acs, GraphicsConfiguration gc) throws VisADException, RemoteException Create a new AerologicalDisplay with the specified CoordinateSystem- Parameters:
acs
- AerologcialCoordinateSystemgc
- The GraphicsConfiguration for the display- Returns:
- a new AerologicalDisplay with the specified CoordinateSystem
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getActiveSounding
Get the active sounding.- Returns:
- the active sounding
-
setForeground
Sets the "foreground" color of this VisAD display- Overrides:
setForeground
in classDisplayMaster
- Parameters:
color
- color to use
-
setLabelColor
Set the label color- Parameters:
color
- label color
-
setWindColor
Set the wind flag color- Parameters:
color
- the color
-
setBackgroundLineColor
Set the background line colors- Parameters:
color
- the color
-