Class ToolAction

java.lang.Object
javax.swing.AbstractAction
org.esa.snap.rcp.actions.interactors.ToolAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, org.openide.util.actions.Presenter, org.openide.util.actions.Presenter.Menu, org.openide.util.actions.Presenter.Popup, org.openide.util.actions.Presenter.Toolbar, org.openide.util.ContextAwareAction, org.openide.util.HelpCtx.Provider, org.openide.util.LookupListener
Direct Known Subclasses:
DrawEllipseToolAction, DrawLineToolAction, DrawPolygonToolAction, DrawPolylineToolAction, DrawRectangleToolAction, GcpToolAction, MagicWandToolAction, PannerToolAction, PinToolAction, RangeFinderAction, SelectToolAction, ZoomToolAction

public abstract class ToolAction extends AbstractAction implements org.openide.util.ContextAwareAction, org.openide.util.LookupListener, org.openide.util.actions.Presenter.Toolbar, org.openide.util.actions.Presenter.Menu, org.openide.util.actions.Presenter.Popup, org.openide.util.HelpCtx.Provider
Tool actions are used to interact with a FigureEditor, such as the VISAT product scene view.

Derived tool actions must at least provide two public constructors:

  1. a default constructor
  2. a constructor that takes a single Lookup argument

Derived actions must also tell the system to load the actions eagerly, that is, use the action registration as follows: @ActionRegistration(displayName = "not-used", lazy = false).

See Also:
  • Field Details

  • Constructor Details

    • ToolAction

      protected ToolAction()
    • ToolAction

      protected ToolAction(org.openide.util.Lookup lookup)
    • ToolAction

      protected ToolAction(org.openide.util.Lookup lookup, com.bc.ceres.swing.figure.Interactor interactor)
  • Method Details

    • getProductSceneView

      public ProductSceneView getProductSceneView()
    • getToolbarPresenter

      public Component getToolbarPresenter()
      Specified by:
      getToolbarPresenter in interface org.openide.util.actions.Presenter.Toolbar
    • getMenuPresenter

      public JMenuItem getMenuPresenter()
      Specified by:
      getMenuPresenter in interface org.openide.util.actions.Presenter.Menu
    • getPopupPresenter

      public JMenuItem getPopupPresenter()
      Specified by:
      getPopupPresenter in interface org.openide.util.actions.Presenter.Popup
    • createContextAwareInstance

      public Action createContextAwareInstance(org.openide.util.Lookup actionContext)
      Specified by:
      createContextAwareInstance in interface org.openide.util.ContextAwareAction
    • resultChanged

      public void resultChanged(org.openide.util.LookupEvent ignored)
      Specified by:
      resultChanged in interface org.openide.util.LookupListener
    • actionPerformed

      public void actionPerformed(ActionEvent actionEvent)
      Specified by:
      actionPerformed in interface ActionListener
    • getLookup

      public org.openide.util.Lookup getLookup()
    • isSelected

      public boolean isSelected()
    • setSelected

      public void setSelected(boolean selected)
    • getInteractor

      public com.bc.ceres.swing.figure.Interactor getInteractor()
    • setInteractor

      public final void setInteractor(com.bc.ceres.swing.figure.Interactor interactor)
    • updateEnabledState

      protected void updateEnabledState()