Class TransectDrawingControl

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

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

    • TransectDrawingControl

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

    • zSliderChanged

      public void zSliderChanged(int value)
      Overwrite this even handler to apply the z position to all of the transect glyphs
      Parameters:
      value - New z position
    • selectionChanged

      protected void selectionChanged()
      The selections set of glyphs has changed. Update the global transects if needed
      Overrides:
      selectionChanged in class DrawingControl
    • transectChanged

      protected void transectChanged(DrawingGlyph glyph)
      Write out the transects when we've changed
      Parameters:
      glyph - Which glyph
    • doneMovingGlyph

      protected void doneMovingGlyph(DrawingGlyph glyph)
      The user is done moving or resizing the given glyph
      Overrides:
      doneMovingGlyph in class DrawingControl
      Parameters:
      glyph - The glyph that was moved
    • removeGlyph

      public void removeGlyph(DrawingGlyph glyph)
      Overwrite base class method to write out the transects on a delete
      Overrides:
      removeGlyph in class DrawingControl
      Parameters:
      glyph - Which glyph
    • initDone

      public void initDone()
      All initialization is done
      Overrides:
      initDone in class DisplayControlImpl
    • getDataProjection

      public MapProjection getDataProjection()
      Since the transect control is created without data object it is alwasy good to creat a map view display first to set the map projection correct for the transect line
      Specified by:
      getDataProjection in interface DisplayControl
      Overrides:
      getDataProjection in class DisplayControlImpl
      Returns:
      The native projection of the data
    • getNormalize360

      public boolean getNormalize360()
    • getShapeCommands

      protected List getShapeCommands()
      Provide the list of shape commands to the base class
      Overrides:
      getShapeCommands in class DrawingControl
      Returns:
      Shape creation commands
    • addControlWidgets

      protected void addControlWidgets(List widgets)
      Add gui components to the list
      Overrides:
      addControlWidgets in class DrawingControl
      Parameters:
      widgets - List if gui components
    • addFileMenuItems

      protected void addFileMenuItems(List items, boolean forMenuBar)
      Add the relevant file menu items into the list
      Overrides:
      addFileMenuItems in class DrawingControl
      Parameters:
      items - List of menu items
      forMenuBar - Is this for the menu in the window's menu bar or for a popup menu in the legend
    • setDisplayedTransect

      public void setDisplayedTransect(TransectViewManager tvm) throws VisADException, RemoteException
      Add and/or change the displayed transect for the given tvm.
      Parameters:
      tvm - The view manager
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • writeTransects

      public void writeTransects()
      Write out the transect xml resource
    • showFilledCbx

      protected boolean showFilledCbx()
      Overwrite base class method to not show the filled cbx
      Overrides:
      showFilledCbx in class DrawingControl
      Returns:
      false
    • makeModePanel

      protected void makeModePanel(List widgets)
      Overwrite base class method to make the mode panel
      Overrides:
      makeModePanel in class DrawingControl
      Parameters:
      widgets - List of panel widgets to add to
    • showTimeWidgets

      protected boolean showTimeWidgets()
      Don't show time widgets
      Overrides:
      showTimeWidgets in class DrawingControl
      Returns:
      false
    • showLocationWidgets

      protected boolean showLocationWidgets()
      Don't show location widgets
      Overrides:
      showLocationWidgets in class DrawingControl
      Returns:
      false
    • getGlyphNameDefault

      protected String getGlyphNameDefault(DrawingGlyph glyph)
      Use a different name
      Overrides:
      getGlyphNameDefault in class DrawingControl
      Parameters:
      glyph - The glyph
      Returns:
      glyph name
    • transectViewsChanged

      public void transectViewsChanged()
      This is called by the VMManager to notify us that one of the TransectViewManagers has changed its zoom.
    • setAutoUpdateTransect

      public void setAutoUpdateTransect(boolean value)
      Set the AutoUpdateTransect property.
      Parameters:
      value - The new value for AutoUpdateTransect
    • getAutoUpdateTransect

      public boolean getAutoUpdateTransect()
      Get the AutoUpdateTransect property.
      Returns:
      The AutoUpdateTransect
    • setShowRegularTransects

      public void setShowRegularTransects(boolean value)
      Set the ShowRegularTransects property.
      Parameters:
      value - The new value for ShowRegularTransects
    • getShowRegularTransects

      public boolean getShowRegularTransects()
      Get the ShowRegularTransects property.
      Returns:
      The ShowRegularTransects
    • setShowDisplayTransects

      public void setShowDisplayTransects(boolean value)
      Set the ShowDisplayTransects property.
      Parameters:
      value - The new value for ShowDisplayTransects
    • getShowDisplayTransects

      public boolean getShowDisplayTransects()
      Get the ShowDisplayTransects property.
      Returns:
      The ShowDisplayTransects
    • setDisplayVisibility

      public void setDisplayVisibility(boolean on)
      Extra check for the display visibility
      Specified by:
      setDisplayVisibility in interface DisplayControl
      Overrides:
      setDisplayVisibility in class DrawingControl
      Parameters:
      on - visible
    • shouldBeVisible

      public boolean shouldBeVisible(DrawingGlyph tg)
      Overwrite base class method to determine if we should show the glyph
      Overrides:
      shouldBeVisible in class DrawingControl
      Parameters:
      tg - The glyph
      Returns:
      Should we show this
    • timeChanged

      protected void timeChanged(Real time)
      Ignore this call
      Overrides:
      timeChanged in class DrawingControl
      Parameters:
      time - The time