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 aFigureEditor
, such as the VISAT product scene view.Derived tool actions must at least provide two public constructors:
- a default constructor
- 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
INTERACTOR_KEY
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ToolAction()
protected
ToolAction(org.openide.util.Lookup lookup)
protected
ToolAction(org.openide.util.Lookup lookup, com.bc.ceres.swing.figure.Interactor interactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent actionEvent)
Action
createContextAwareInstance(org.openide.util.Lookup actionContext)
com.bc.ceres.swing.figure.Interactor
getInteractor()
org.openide.util.Lookup
getLookup()
JMenuItem
getMenuPresenter()
JMenuItem
getPopupPresenter()
ProductSceneView
getProductSceneView()
Component
getToolbarPresenter()
boolean
isSelected()
void
resultChanged(org.openide.util.LookupEvent ignored)
void
setInteractor(com.bc.ceres.swing.figure.Interactor interactor)
void
setSelected(boolean selected)
protected void
updateEnabledState()
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
INTERACTOR_KEY
public static final String INTERACTOR_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProductSceneView
public ProductSceneView getProductSceneView()
-
getToolbarPresenter
public Component getToolbarPresenter()
- Specified by:
getToolbarPresenter
in interfaceorg.openide.util.actions.Presenter.Toolbar
-
getMenuPresenter
public JMenuItem getMenuPresenter()
- Specified by:
getMenuPresenter
in interfaceorg.openide.util.actions.Presenter.Menu
-
getPopupPresenter
public JMenuItem getPopupPresenter()
- Specified by:
getPopupPresenter
in interfaceorg.openide.util.actions.Presenter.Popup
-
createContextAwareInstance
public Action createContextAwareInstance(org.openide.util.Lookup actionContext)
- Specified by:
createContextAwareInstance
in interfaceorg.openide.util.ContextAwareAction
-
resultChanged
public void resultChanged(org.openide.util.LookupEvent ignored)
- Specified by:
resultChanged
in interfaceorg.openide.util.LookupListener
-
actionPerformed
public void actionPerformed(ActionEvent actionEvent)
- Specified by:
actionPerformed
in interfaceActionListener
-
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()
-
-