Class GridTrajectoryControlNew

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

public class GridTrajectoryControlNew 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_
    • currentLevelx

      protected Object currentLevelx
      _more_
    • currentLevely

      protected Object currentLevely
      _more_
    • bundleLevel

      protected Object bundleLevel
      _more_
    • bundleLevelx

      protected Object bundleLevelx
      _more_
    • bundleLevely

      protected Object bundleLevely
      _more_
    • currentLevels

      protected Object[] currentLevels
      _more_
    • dataSelection1

      protected DataSelection dataSelection1
      _more_
    • gridDataInstance

      protected GridDataInstance gridDataInstance
      _more_
  • Constructor Details

    • GridTrajectoryControlNew

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

    • setColoredByAnother

      public void setColoredByAnother(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getColoredByAnother

      public boolean getColoredByAnother()
      _more_
      Returns:
      _more_
    • setUseSpeedForColor

      public void setUseSpeedForColor(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getUseSpeedForColor

      public boolean getUseSpeedForColor()
      _more_
      Returns:
      _more_
    • setIsStreamline

      public void setIsStreamline(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getIsStreamline

      public boolean getIsStreamline()
      _more_
      Returns:
      _more_
    • setWithTopo

      public void setWithTopo(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getWithTopo

      public boolean getWithTopo()
      _more_
      Returns:
      _more_
    • setIs2D

      public void setIs2D(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getIs2D

      public boolean getIs2D()
      _more_
      Returns:
      _more_
    • getIsXY

      public boolean getIsXY()
      _more_
      Returns:
      _more_
    • setIsXY

      public void setIsXY(boolean isxy)
      _more_
    • getIsXZ

      public boolean getIsXZ()
      _more_
      Returns:
      _more_
    • setIsXZ

      public void setIsXZ(boolean isxz)
      _more_
    • getIsYZ

      public boolean getIsYZ()
      _more_
      Returns:
      _more_
    • setIsYZ

      public void setIsYZ(boolean isyz)
      _more_
    • 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
    • reInit

      public boolean reInit(DataChoice dataChoice) throws VisADException, RemoteException
      Call the api when reset the datachoice such as time driver times changed
      Parameters:
      dataChoice - the DataChoice of the moment.
      Returns:
      true if everything is okay
      Throws:
      RemoteException - When bad things happen
      VisADException - When bad things happen
    • initDone

      public void initDone()
      _more_
      Overrides:
      initDone in class DisplayControlImpl
    • doMakeLevelControl

      public JComboBox doMakeLevelControl(int len, String cmd)
      Parameters:
      len - _more_
      cmd - _more_
    • setLevelsX

      public void setLevelsX(int xlen)
      _more_
      Parameters:
      xlen - _more_
    • setLevelsY

      public void setLevelsY(int ylen)
      _more_
      Parameters:
      ylen - _more_
    • 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_
    • 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_
    • setLevelx

      public void setLevelx(Object r)
      _more_
      Parameters:
      r - _more_
    • setLevely

      public void setLevely(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, int skipFactor) throws Exception
      _more_
      Parameters:
      latIndex - _more_
      lonIndex - _more_
      domain0 - _more_
      alt - _more_
      skipFactor - _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)
    • getInitialZPosition

      protected double getInitialZPosition()
      _more_
      Overrides:
      getInitialZPosition in class DrawingControl
      Returns:
      _more_
    • getZPosition

      public double getZPosition()
      _more_
      Overrides:
      getZPosition in class DisplayControlImpl
      Returns:
      _more_
    • 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_
    • setCurrentLevelx

      public void setCurrentLevelx(Object lvl)
      _more_
      Parameters:
      lvl - _more_
    • getCurrentLevelx

      public Object getCurrentLevelx()
      _more_
      Returns:
      _more_
    • setCurrentLevely

      public void setCurrentLevely(Object lvl)
      _more_
      Parameters:
      lvl - _more_
    • getCurrentLevely

      public Object getCurrentLevely()
      _more_
      Returns:
      _more_
    • getCurrentCmd

      public DrawingCommand getCurrentCmd()
      _more_
      Returns:
      _more_
    • setTrackArrowHead

      public void setTrackArrowHead(boolean ah)
      _more_
      Parameters:
      ah - _more_
    • getTrackArrowHead

      public boolean getTrackArrowHead()
      _more_
      Returns:
      _more_
    • getTrackFormType

      public Integer getTrackFormType()
      _more_
      Returns:
      _more_
    • setTrackFormType

      public void setTrackFormType(Integer ah)
      _more_
      Parameters:
      ah - _more_
    • getTrackOffsetValue

      public float getTrackOffsetValue()
      _more_
      Returns:
      _more_
    • setTrackOffsetValue

      public void setTrackOffsetValue(float ah)
      _more_
      Parameters:
      ah - _more_
    • setTracerType

      public void setTracerType(int type)
      _more_
    • getSmoothFactorValue

      public int getSmoothFactorValue()
      _more_
      Returns:
      _more_
    • setSmoothFactorValue

      public void setSmoothFactorValue(int ah)
      _more_
      Parameters:
      ah - _more_
    • getTrackColor

      public Color getTrackColor()
      _more_
      Returns:
      _more_
    • setTrackColor

      public void setTrackColor(Color ah)
      _more_
      Parameters:
      ah - _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_
    • 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:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getGridDataInstance

      public GridDataInstance getGridDataInstance()
      _more_
      Returns:
      _more_
    • resetData

      protected void resetData() throws VisADException, RemoteException
      _more_
      Overrides:
      resetData in class DrawingControl
      Throws:
      VisADException - On badness
      RemoteException - On badness