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
FigureEditor
,
such as the VISAT product scene view.
Derived tool actions must at least provide two public constructors:
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)
.
Modifier and Type | Field and Description |
---|---|
static String |
INTERACTOR_KEY |
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Modifier | Constructor and Description |
---|---|
protected |
ToolAction() |
protected |
ToolAction(org.openide.util.Lookup lookup) |
protected |
ToolAction(org.openide.util.Lookup lookup,
Interactor interactor) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent actionEvent) |
Action |
createContextAwareInstance(org.openide.util.Lookup actionContext) |
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(Interactor interactor) |
void |
setSelected(boolean selected) |
protected void |
updateEnabledState() |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public static final String INTERACTOR_KEY
protected ToolAction()
protected ToolAction(org.openide.util.Lookup lookup)
protected ToolAction(org.openide.util.Lookup lookup, Interactor interactor)
public ProductSceneView getProductSceneView()
public Component getToolbarPresenter()
getToolbarPresenter
in interface org.openide.util.actions.Presenter.Toolbar
public JMenuItem getMenuPresenter()
getMenuPresenter
in interface org.openide.util.actions.Presenter.Menu
public JMenuItem getPopupPresenter()
getPopupPresenter
in interface org.openide.util.actions.Presenter.Popup
public Action createContextAwareInstance(org.openide.util.Lookup actionContext)
createContextAwareInstance
in interface org.openide.util.ContextAwareAction
public void resultChanged(org.openide.util.LookupEvent ignored)
resultChanged
in interface org.openide.util.LookupListener
public final void actionPerformed(ActionEvent actionEvent)
actionPerformed
in interface ActionListener
public org.openide.util.Lookup getLookup()
public boolean isSelected()
public void setSelected(boolean selected)
public Interactor getInteractor()
public final void setInteractor(Interactor interactor)
protected void updateEnabledState()
Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.