Class WindProfileDisplay

java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.sounding.WindProfileDisplay
Direct Known Subclasses:
Hodograph3DDisplay, WindStaffDisplay

public abstract class WindProfileDisplay extends DisplayMaster
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 Details

    • GEOPOTENTIAL_ALTITUDE

      public static String GEOPOTENTIAL_ALTITUDE
      The name of the geopotential altitude property.
    • PROFILE_SPEED

      public static String PROFILE_SPEED
      The name of the profile wind-speed property.
    • PROFILE_DIRECTION

      public static String PROFILE_DIRECTION
      The name of the profile wind-direction property.
    • ACTIVE_PROFILE

      public static String ACTIVE_PROFILE
      The name of the active profile property.
    • ACTIVE_MEAN_WIND

      public static String 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

      protected static Real getDefaultMinAltitude()
      Returns the default, minimum altitude.
      Returns:
      The default, minimum altitude.
    • getDefaultMaxAltitude

      protected static Real getDefaultMaxAltitude()
      Returns the default, maximum altitude.
      Returns:
      The default, maximum altitude.
    • getWindProfileSet

      protected WindProfileSet 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

      public void addProfile(int index, Field field) throws VisADException, RemoteException
      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

      public void setActiveWindProfile(int index) throws VisADException, RemoteException
      Sets the active wind profile.
      Parameters:
      index - The index of the active wind profile.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setProfileVisible

      public void setProfileVisible(int index, boolean visible) throws VisADException, RemoteException
      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

      protected abstract WindProfile newWindProfile() throws VisADException, RemoteException
      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

      public Field getWindProfile() throws RemoteException, VisADException
      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

      public void setMeanWind(int index, Tuple meanWind) throws VisADException, RemoteException
      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

      public void setMeanWindVisible(int index, boolean visible) throws VisADException, RemoteException
      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

      public void setActiveMeanWind(int index) throws VisADException, RemoteException
      Sets the active mean-wind.
      Parameters:
      index - The index of the active mean-wind.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • clear

      public void clear() throws VisADException, RemoteException
      Clears the wind data.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getMinProfileAltitude

      public Real getMinProfileAltitude() throws VisADException, RemoteException
      Returns the minimum profile altitude.
      Returns:
      The minimum profile altitude.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getMaxProfileAltitude

      public Real getMaxProfileAltitude() throws VisADException, RemoteException
      Returns the maximum profile altitude.
      Returns:
      The maximum profile altitude.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setGeopotentialAltitude

      public void setGeopotentialAltitude(Real geoAlt) throws VisADException, RemoteException
      Sets the geopotential altitude property.
      Parameters:
      geoAlt - The new value.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getGeopotentialAltitude

      public Real getGeopotentialAltitude()
      Returns the geopotential altitude property.
      Returns:
      The geopotential altitude property.
    • getProfileSpeed

      protected Real getProfileSpeed()
      Returns the profile-wind-speed property.
      Returns:
      The profile-wind-speed property.
    • getProfileDirection

      protected Real getProfileDirection()
      Returns the profile-wind-direction property.
      Returns:
      The profile-wind-direction property.
    • setBackgroundVisible

      public void setBackgroundVisible(boolean b) throws VisADException, RemoteException
      Display or hide the background
      Parameters:
      b - display background if true, otherwise hide the background
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setAltitudeScaleVisible

      public void setAltitudeScaleVisible(boolean visible) throws VisADException, RemoteException
      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

      protected void setAltitudeMapRange() throws RemoteException, VisADException
      Scales the altitude ScalarMap.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setAltitudeColorMapRange

      protected void setAltitudeColorMapRange() throws RemoteException, VisADException
      Scales the altitude-color ScalarMap.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setDisplayAltitudeExtent

      protected void setDisplayAltitudeExtent() throws VisADException, RemoteException
      Sets the extent of the displayed altitudes.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setDisplayAltitudeExtent

      public void setDisplayAltitudeExtent(RealTuple extent) throws VisADException, RemoteException
      Sets the extent of the displayed altitudes.
      Parameters:
      extent - The extent of the displayed altitudes.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • displayAltitudeExtentChange

      protected abstract void displayAltitudeExtentChange() throws VisADException, RemoteException
      Handles a change to the extent of the displayed altitudes.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getMinDisplayAltitude

      public Real getMinDisplayAltitude() throws VisADException, RemoteException
      Returns the minimum, display altitude.
      Returns:
      The minimum, display altitude.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getMaxDisplayAltitude

      public Real getMaxDisplayAltitude() throws VisADException, RemoteException
      Returns the maximum, display altitude.
      Returns:
      The maximum, display altitude.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setAltitudeUnit

      public void setAltitudeUnit(Unit geoAltUnit) throws UnitException, VisADException, RemoteException
      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

      public Unit getAltitudeUnit()
      Returns the displayed, altitude unit.
      Returns:
      The displayed, altitude unit.
    • setCursorPosition

      protected abstract void setCursorPosition(double[] position) throws VisADException, RemoteException
      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

      protected abstract Displayable newMeanWind(Tuple meanWind) throws VisADException, RemoteException
      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

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