Class GridTrajectoryControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener

public class GridTrajectoryControl extends DrawingControl
A MetApps Display Control for drawing lines on a navigated display.
Version:
$Revision: 1.145 $
Author:
MetApps development team
  • Field Details

    • enabledCbx

      protected JCheckBox enabledCbx
      Controls the disabled state
    • CMD_REMOVE

      public static final DrawingCommand CMD_REMOVE
      command
    • CMD_SETLEVELS

      public static final String CMD_SETLEVELS
      _more_
      See Also:
    • CMD_createTrj

      public static final String CMD_createTrj
      _more_
      See Also:
    • currentLevel

      protected Object currentLevel
      _more_
    • bundleLevel

      protected Object bundleLevel
      _more_
    • currentLevels

      protected Object[] currentLevels
      _more_
    • dataSelection1

      protected DataSelection dataSelection1
      _more_
    • gridDataInstance

      protected GridDataInstance gridDataInstance
      _more_
  • Constructor Details

    • GridTrajectoryControl

      public GridTrajectoryControl()
      Create a new Drawing Control; set attributes.
  • Method Details

    • timeChanged

      protected void timeChanged(Real time)
      _more_
      Overrides:
      timeChanged in class DrawingControl
      Parameters:
      time - _more_
    • getTrackLineWidth

      public int getTrackLineWidth()
      _more_
      Returns:
      _more_
    • setTrackLineWidth

      public void setTrackLineWidth(int width)
      _more_
      Parameters:
      width - _more_
    • getTrjDataTimeRange

      public DataTimeRange getTrjDataTimeRange()
      _more_
      Returns:
      _more_
    • setTrjDataTimeRange

      public void setTrjDataTimeRange(DataTimeRange range)
      _more_
      Parameters:
      range - _more_
    • getTrjColorRange

      public Range getTrjColorRange()
      _more_
      Returns:
      _more_
    • setTrjColorRange

      public void setTrjColorRange(Range crange)
      _more_
      Parameters:
      crange - _more_
    • getTrjColorTable

      public ColorTable getTrjColorTable()
      _more_
      Returns:
      _more_
    • setTrjColorTable

      public void setTrjColorTable(ColorTable ctable)
      _more_
      Parameters:
      ctable - _more_
    • init

      public boolean init(DataChoice dataChoice) throws VisADException, RemoteException
      Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far). This method is called from inside DisplayControlImpl.init(several args).
      Overrides:
      init in class DrawingControl
      Parameters:
      dataChoice - the DataChoice of the moment.
      Returns:
      true if everything is okay
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • initData

      public boolean initData() throws VisADException, RemoteException
      Call this to reset the data before the calculation of the traj.
      Returns:
      true if everything is okay
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • dataChanged

      public void dataChanged()
      Description copied from class: DisplayControlImpl
      Implementation of DataChangeListener.
      Specified by:
      dataChanged in interface DataChangeListener
      Overrides:
      dataChanged in class DisplayControlImpl
    • displayUnitChanged

      protected void displayUnitChanged(Unit oldUnit, Unit newUnit)
      _more_
      Overrides:
      displayUnitChanged in class DisplayControlImpl
      Parameters:
      oldUnit - _more_
      newUnit - _more_
    • createTrajectory

      public void createTrajectory()
      _more_
    • initAfterUnPersistence

      public void initAfterUnPersistence(ControlContext vc, Hashtable properties, List preSelectedDataChoices)
      _more_
      Specified by:
      initAfterUnPersistence in interface DisplayControl
      Overrides:
      initAfterUnPersistence in class DisplayControlImpl
      Parameters:
      vc - _more_
      properties - _more_
      preSelectedDataChoices - _more_
    • getHaveInitialized

      public boolean getHaveInitialized()
      _more_
      Overrides:
      getHaveInitialized in class DisplayControlImpl
      Returns:
      _more_
    • setLevels

      public void setLevels(Object[] levels, Object initLevel)
      current level
      Parameters:
      levels - _more_
      initLevel - _more_
    • setLevel

      public void setLevel(Object r)
      _more_
      Parameters:
      r - _more_
    • getLevelsLabel

      public String getLevelsLabel()
      Get the label for the levels box.
      Returns:
      the label
    • initDisplayUnit

      protected void initDisplayUnit()
      Initialize the display unit
      Overrides:
      initDisplayUnit in class DrawingControl
    • shouldAddDisplayListener

      protected boolean shouldAddDisplayListener()
      Signal base class to add this as a display listener
      Overrides:
      shouldAddDisplayListener in class DrawingControl
      Returns:
      Add as display listener
    • shouldAddControlListener

      protected boolean shouldAddControlListener()
      Signal base class to add this as a control listener
      Overrides:
      shouldAddControlListener in class DrawingControl
      Returns:
      Add as control listener
    • doRemove

      public void doRemove() throws VisADException, RemoteException
      Remove this DisplayControl from the system. Nulls out any objects for garbage collection
      Specified by:
      doRemove in interface DisplayControl
      Overrides:
      doRemove in class DrawingControl
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • getLegendLabels

      protected void getLegendLabels(List labels, int legendType)
      Overwrite the legend labels method to use the editor title if there is one.
      Overrides:
      getLegendLabels in class DrawingControl
      Parameters:
      labels - List of labels
      legendType - Side or bottom
    • removeGlyph

      public void removeGlyph(DrawingGlyph glyph)
      Remove the glyph from the drawing
      Overrides:
      removeGlyph in class DrawingControl
      Parameters:
      glyph - The glyph to remove
    • getColorParamName

      protected String getColorParamName()
      _more_
      Returns:
      _more_
    • getEarthLocationPoints

      public float[][] getEarthLocationPoints(int latIndex, int lonIndex, SampledSet domain0, Real alt) throws Exception
      _more_
      Parameters:
      latIndex - _more_
      lonIndex - _more_
      domain0 - _more_
      alt - _more_
      Returns:
      _more_
      Throws:
      Exception - _more_
    • doMakeContents

      protected Container doMakeContents() throws VisADException, RemoteException
      Make the gui
      Overrides:
      doMakeContents in class DrawingControl
      Returns:
      The gui
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • doMakeControlsPanel

      protected JComponent doMakeControlsPanel()
      Make the main tabbed pane
      Overrides:
      doMakeControlsPanel in class DrawingControl
      Returns:
      Controls panel
    • addControlWidgets

      protected void addControlWidgets(List widgets)
      Add the widgets into the controls panel
      Overrides:
      addControlWidgets in class DrawingControl
      Parameters:
      widgets - List to add to. Add in pairs (label, widget)
    • setBackwardTrajectory

      public void setBackwardTrajectory(boolean back) throws Exception
      _more_
      Parameters:
      back - _more_
      Throws:
      Exception - _more_
    • getBackwardTrajectory

      public boolean getBackwardTrajectory() throws Exception
      _more_
      Returns:
      _more_
      Throws:
      Exception - _more_
    • showLocationWidgets

      protected boolean showLocationWidgets()
      Should we show the locatio widgets
      Overrides:
      showLocationWidgets in class DrawingControl
      Returns:
      show the locatio widgets
    • applyColorToAll

      public void applyColorToAll()
      Apply the current color to all glyphs
      Overrides:
      applyColorToAll in class DrawingControl
    • setSkipValue

      public void setSkipValue(int value)
      Set the skip value
      Overrides:
      setSkipValue in class DisplayControlImpl
      Parameters:
      value - skip value
    • removeAllGlyphs

      public void removeAllGlyphs()
      Remove em all.
      Overrides:
      removeAllGlyphs in class DrawingControl
    • removeGC

      public void removeGC()
      _more_
    • getCoordType

      public int getCoordType()
      _more_
      Overrides:
      getCoordType in class DrawingControl
      Returns:
      _more_
    • setCurrentLevel

      public void setCurrentLevel(Object lvl)
      _more_
      Parameters:
      lvl - _more_
    • getCurrentLevel

      public Object getCurrentLevel()
      _more_
      Returns:
      _more_
    • getCurrentCmd

      public DrawingCommand getCurrentCmd()
      _more_
      Returns:
      _more_
    • setCurrentCmd

      public void setCurrentCmd(String command)
      _more_
      Parameters:
      command - _more_
    • setColorScaleInfo

      public void setColorScaleInfo(ColorScaleInfo newInfo) throws VisADException, RemoteException
      Get the range to use to apply to displayables
      Overrides:
      setColorScaleInfo in class DisplayControlImpl
      Parameters:
      newInfo - _more_
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getRangeToApply

      public Range getRangeToApply() throws RemoteException, VisADException
      _more_
      Overrides:
      getRangeToApply in class DisplayControlImpl
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getColorTableToApply

      protected ColorTable getColorTableToApply()
      _more_
      Overrides:
      getColorTableToApply in class DisplayControlImpl
      Returns:
      _more_
    • getColorScaleInfo

      public ColorScaleInfo getColorScaleInfo()
      Get the contour information for any contours
      Overrides:
      getColorScaleInfo in class DisplayControlImpl
      Returns:
      the contour information
    • getCreateTrjBtnClicked

      public boolean getCreateTrjBtnClicked()
      _more_
      Returns:
      _more_
    • setCreateTrjBtnClicked

      public void setCreateTrjBtnClicked(boolean clicked)
      _more_
      Parameters:
      clicked - _more_
    • getIsPoints

      public boolean getIsPoints()
      _more_
      Returns:
      _more_
    • setIsPoints

      public void setIsPoints(boolean point)
      _more_
      Parameters:
      point - _more_
    • getCoordinateType

      public int getCoordinateType()
      _more_
      Returns:
      _more_
    • setCoordinateType

      public void setCoordinateType(int type)
      _more_
      Parameters:
      type - _more_
    • doMakeDataInstance

      protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException
      _more_
      Overrides:
      doMakeDataInstance in class DisplayControlImpl
      Parameters:
      dataChoice - _more_
      Returns:
      The created DataInstance or null.
      Throws:
      RemoteException - if a Java RMI failure occurs.
      VisADException - if a VisAD Failure occurs.
    • getGridDataInstance

      public GridDataInstance getGridDataInstance()
      _more_