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
Lookupargument
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, enabledFields 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
ConstructorsModifierConstructorDescriptionprotectedprotectedToolAction(org.openide.util.Lookup lookup) protectedToolAction(org.openide.util.Lookup lookup, com.bc.ceres.swing.figure.Interactor interactor) -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent actionEvent) createContextAwareInstance(org.openide.util.Lookup actionContext) com.bc.ceres.swing.figure.Interactororg.openide.util.LookupbooleanvoidresultChanged(org.openide.util.LookupEvent ignored) final voidsetInteractor(com.bc.ceres.swing.figure.Interactor interactor) voidsetSelected(boolean selected) protected voidMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods 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:
getToolbarPresenterin interfaceorg.openide.util.actions.Presenter.Toolbar
-
getMenuPresenter
- Specified by:
getMenuPresenterin interfaceorg.openide.util.actions.Presenter.Menu
-
getPopupPresenter
- Specified by:
getPopupPresenterin interfaceorg.openide.util.actions.Presenter.Popup
-
createContextAwareInstance
- Specified by:
createContextAwareInstancein interfaceorg.openide.util.ContextAwareAction
-
resultChanged
public void resultChanged(org.openide.util.LookupEvent ignored) - Specified by:
resultChangedin interfaceorg.openide.util.LookupListener
-
actionPerformed
- Specified by:
actionPerformedin 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()
-