Class TimeHeightControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener
Direct Known Subclasses:
FlowTimeHeightControl, Level2TimeHeightControl, TimeHeightControl.MyTimeHeightControl

public class TimeHeightControl extends LineProbeControl
Given an earth-locared 3D VisAD Field with a time domain, make a 2D plot of the range data against height and time for one location on the Earth, and make related controls. The display is in its own window; there is also a related selector point on the other main map display which allows user to select and move the sample location on Earth.
Version:
$Revision: 1.72 $Date: 2006/12/01 20:16:38 $
Author:
IDV Development Team
  • Field Details

    • SHARE_PROFILE

      public static final String SHARE_PROFILE
      property for sharing the profile location
      See Also:
    • profileDisplay

      protected XYDisplay profileDisplay
      XY display for displaying time/height diagram
    • fieldImpl

      protected FieldImpl fieldImpl
      the data
    • contourDisplay

      protected Contour2DDisplayable contourDisplay
      Displayable for contours
    • foreground

      protected Color foreground
      foreground color
    • background

      protected Color background
      background color
    • timeHeightView

      protected TimeHeightViewManager timeHeightView
      the control window's view manager
    • controlPane

      protected JPanel controlPane
      the control for second variable
    • DEFAULT_PRESSURE_LABELS

      public static String[] DEFAULT_PRESSURE_LABELS
      default pressure labels
  • Constructor Details

    • TimeHeightControl

      public TimeHeightControl()
      Default Contructor; sets flags. See init() for creation actions.
  • Method Details

    • init

      public boolean init(DataChoice dataChoice) throws VisADException, RemoteException
      Construct the display, frame, and controls
      Overrides:
      init in class DisplayControlImpl
      Parameters:
      dataChoice - the data to use
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getVerticalRange

      public Range getVerticalRange(GriddedSet domainSet) throws VisADException
      _more_
      Parameters:
      domainSet - _more_
      Returns:
      _more_
      Throws:
      VisADException - _more_
    • getDefaultDisplayListTemplate

      protected String getDefaultDisplayListTemplate()
      Get the default display list template for this control. Subclasses can override
      Overrides:
      getDefaultDisplayListTemplate in class DisplayControlImpl
      Returns:
      the default template
    • getDataDisplayFlags

      protected int getDataDisplayFlags()
      Get the attribute flags for the data display
      Returns:
      the flags
    • createDataDisplay

      protected DisplayableData createDataDisplay() throws VisADException, RemoteException
      Create the default data display if not showAsContours
      Returns:
      the default display
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getDataDisplay

      public DisplayableData getDataDisplay()
      Return the Displayable created by createDataDisplay.
      Returns:
      DisplayableData
    • setData

      protected boolean setData(DataChoice dataChoice) throws VisADException, RemoteException
      User has asked to see a different new parameter in this existing display. Do everything needed to load display with new kind of parameter.
      Overrides:
      setData in class DisplayControlImpl
      Parameters:
      dataChoice - choice for data
      Returns:
      true if successfule
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • initDone

      public void initDone()
      Called after init(). Load profile into display.
      Overrides:
      initDone in class DisplayControlImpl
    • initAfterUnPersistence

      public void initAfterUnPersistence(ControlContext vc, Hashtable properties, List preSelectedDataChoices)
      Called by the IntegratedDataViewer to initialize after this control has been unpersisted
      Specified by:
      initAfterUnPersistence in interface DisplayControl
      Overrides:
      initAfterUnPersistence in class DisplayControlImpl
      Parameters:
      vc - The context in which this control exists
      properties - Properties that may hold things
      preSelectedDataChoices - set of preselected data choices
    • getTimeHeightViewManager

      protected ViewManager getTimeHeightViewManager()
      Get the view manager for the control window.
      Returns:
      control window's view manager
    • doMakeContents

      protected Container doMakeContents() throws VisADException, RemoteException
      Make the UI contents for this control window.
      Overrides:
      doMakeContents in class DisplayControlImpl
      Returns:
      UI container
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • displayTHForCoord

      protected void displayTHForCoord(FieldImpl fi, int NN) throws VisADException, RemoteException
      Make a 2D display of the range values against domain coordinate # NN.
      Parameters:
      fi - a VisAD FlatField or seqence of FlatFields with 3 or more domain coordinates, manifold dimension 1.
      NN - an integer, the index number of the coordinate to use as profile or y axis of plot (0,1,2,...)
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • applySmoothing

      protected void applySmoothing() throws VisADException, RemoteException
      Use the value of the smoothing type and weight to subset the data.
      Overrides:
      applySmoothing in class DisplayControlImpl
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • probePositionChanged

      protected void probePositionChanged(RealTuple position)
      Method to call when the probe position changes
      Overrides:
      probePositionChanged in class LineProbeControl
      Parameters:
      position - new position
    • loadProfile

      public void loadProfile(RealTuple position) throws VisADException, RemoteException
      Given the location of the profile SelectorPoint, create a data set for a profile at that location, and load it in display. Show lat-lon location on the control frame.
      Parameters:
      position - the location
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getAltUnit

      public Unit getAltUnit()
    • setAltUnit

      public void setAltUnit(Unit altUnit)
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      make widgets for check box for latest data time on left of x axis.
      Overrides:
      getControlWidgets in class DisplayControlImpl
      Parameters:
      controlWidgets - to fill
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getPressureLabels

      public Hashtable getPressureLabels(String[] labels) throws VisADException
      get y (altitude) axis pressure values hashtable
      Parameters:
      labels - pressure labels
      Throws:
      VisADException - VisAD error
    • getPositionLL

      public LatLonPoint getPositionLL(RealTuple position) throws VisADException, RemoteException
      Get the position as a lat/lon point
      Parameters:
      position - position in XYZ or LatLonAlt space
      Returns:
      position as lat/lon
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getViewMenuItems

      protected void getViewMenuItems(List items, boolean forMenuBar)
      Add items to the command menu.
      Overrides:
      getViewMenuItems in class DisplayControlImpl
      Parameters:
      items - menu to add to.
      forMenuBar - whether for menu bar (true) or popup (false)
    • getChangeParameterLabel

      protected String getChangeParameterLabel()
      A hook to allow derived classes to have their own label in the menu for the change data call.
      Overrides:
      getChangeParameterLabel in class DisplayControlImpl
      Returns:
      Menu label for the change data call.
    • doMakeChangeParameterMenuItem

      protected JMenuItem doMakeChangeParameterMenuItem()
      Utility to make the menu item for changing the data choice
      Overrides:
      doMakeChangeParameterMenuItem in class DisplayControlImpl
      Returns:
      The menu item
    • addNewData

      protected void addNewData(List newChoices) throws VisADException, RemoteException
      Called when the user chooses new data for this display
      Overrides:
      addNewData in class DisplayControlImpl
      Parameters:
      newChoices - List of new DataChoice-s
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • processNewData

      protected void processNewData(List newChoices) throws VisADException, RemoteException
      Override base class method which is called when the user has selected new data choices.
      Parameters:
      newChoices - new list of choices
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • addPropertiesComponents

      public void addPropertiesComponents(JTabbedPane jtp)
      Add tabs to the properties dialog.
      Overrides:
      addPropertiesComponents in class DisplayControlImpl
      Parameters:
      jtp - the JTabbedPane to add to
    • doApplyProperties

      public boolean doApplyProperties()
      Apply the properties
      Overrides:
      doApplyProperties in class DisplayControlImpl
      Returns:
      true if successful
    • applyPreferences

      public void applyPreferences()
      Apply the preferences. Used to pick up the date format changes.
      Specified by:
      applyPreferences in interface DisplayControl
      Overrides:
      applyPreferences in class DisplayControlImpl
    • setLatestOnLeft

      public void setLatestOnLeft(boolean yesorno)
      Set whether latest data is displayed on the left or right side of the plot. Used by XML persistence mainly.
      Parameters:
      yesorno - true if want latest is on left.
    • getLatestOnLeft

      public boolean getLatestOnLeft()
      Get whether latest data is displayed on the left or right side of the plot.
      Returns:
      true if latest is on left.
    • setShowAsImage

      public void setShowAsImage(boolean yesorno)
      Get whether the display is shown as an image.
      Parameters:
      yesorno - true if want an image instead of contours. deprecated use #setShowAsContours(boolean) instead
    • setShowAsContours

      public void setShowAsContours(boolean yesorno)
      Get whether the display is shown as contours.
      Parameters:
      yesorno - true if want contours instead of an image.
    • getShowAsContours

      public boolean getShowAsContours()
      Get whether the display is an image or contours.
      Returns:
      true if contours display, false if image
    • setColorFill

      public void setColorFill(boolean yesorno)
      Get whether the display is shown as contours.
      Parameters:
      yesorno - true if want contours instead of an image.
    • getColorFill

      public boolean getColorFill()
      Get whether the display is an image or contours.
      Returns:
      true if contours display, false if image
    • getForeground

      public Color getForeground()
      Get the foreground color
      Returns:
      the foreground color
    • setForeground

      public void setForeground(Color color)
      Set the foreground color
      Parameters:
      color - new color
    • getBackground

      public Color getBackground()
      Get the background color
      Returns:
      the background color
    • setBackground

      public void setBackground(Color color)
      Set the background color
      Parameters:
      color - new color
    • getMyColorTable

      public ColorTable getMyColorTable()
      Get the background color
      Returns:
      the background color
    • setMyColorTable

      public void setMyColorTable(ColorTable color) throws RemoteException, VisADException
      Set the background color
      Parameters:
      color - new color
      Throws:
      RemoteException
      VisADException
    • getMyContourInfo

      public ContourInfo getMyContourInfo()
      Get the background color
      Returns:
      the background color
    • setMyContourInfo

      public void setMyContourInfo(ContourInfo contourInfo) throws RemoteException, VisADException
      Set the background color
      Parameters:
      contourInfo - new color
      Throws:
      RemoteException
      VisADException
    • getMySmoothingType

      public String getMySmoothingType()
      Get the background color
      Returns:
      the background color
    • setMySmoothingType

      public void setMySmoothingType(String smoothingType) throws RemoteException, VisADException
      Set the background color
      Parameters:
      smoothingType - new color
      Throws:
      RemoteException
      VisADException
    • getMySmoothingFactor

      public int getMySmoothingFactor()
      Get the background color
      Returns:
      the background color
    • setMySmoothingType

      public void setMySmoothingType(int smoothingFactor) throws RemoteException, VisADException
      Set the background color
      Parameters:
      smoothingFactor - new color
      Throws:
      RemoteException
      VisADException
    • reSetTimeHeightAltitudeUnit

      protected void reSetTimeHeightAltitudeUnit(Unit aUnit) throws VisADException
      This gets called by changing the altitude unit
      Parameters:
      aUnit - _more_
      Throws:
      VisADException