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:
- 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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openide.util.actions.Presenter
org.openide.util.actions.Presenter.Menu, org.openide.util.actions.Presenter.Popup, org.openide.util.actions.Presenter.Toolbar
-
Field Summary
FieldsFields 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
ConstructorsModifierConstructorDescriptionprotected
protected
ToolAction
(org.openide.util.Lookup lookup) protected
ToolAction
(org.openide.util.Lookup lookup, com.bc.ceres.swing.figure.Interactor interactor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent actionEvent) createContextAwareInstance
(org.openide.util.Lookup actionContext) com.bc.ceres.swing.figure.Interactor
org.openide.util.Lookup
boolean
void
resultChanged
(org.openide.util.LookupEvent ignored) final void
setInteractor
(com.bc.ceres.swing.figure.Interactor interactor) void
setSelected
(boolean selected) protected void
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
Methods inherited from interface org.openide.util.HelpCtx.Provider
getHelpCtx
-
Field Details
-
INTERACTOR_KEY
- See Also:
-
-
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
-
getToolbarPresenter
- Specified by:
getToolbarPresenter
in interfaceorg.openide.util.actions.Presenter.Toolbar
-
getMenuPresenter
- Specified by:
getMenuPresenter
in interfaceorg.openide.util.actions.Presenter.Menu
-
getPopupPresenter
- Specified by:
getPopupPresenter
in interfaceorg.openide.util.actions.Presenter.Popup
-
createContextAwareInstance
- 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
- 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()
-