public abstract class AbstractOverlayAction extends AbstractAction implements org.openide.util.actions.Presenter.Toolbar, org.openide.util.actions.Presenter.Menu, org.openide.util.actions.Presenter.Popup, SelectionSupport.Handler<ProductSceneView>
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 |
AbstractOverlayAction() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
protected abstract boolean |
getActionEnabledState(ProductSceneView view) |
protected abstract boolean |
getActionSelectionState(ProductSceneView view)
Compute the state of a ProductSceneView that is selected.
|
JMenuItem |
getMenuPresenter() |
JMenuItem |
getPopupPresenter() |
protected ProductSceneView |
getSelectedProductSceneView() |
Component |
getToolbarPresenter() |
protected abstract void |
initActionProperties() |
protected boolean |
isSelected() |
void |
selectionChange(ProductSceneView oldValue,
ProductSceneView newValue)
Called if a selection changed.
|
protected abstract void |
setOverlayEnableState(ProductSceneView view) |
protected void |
updateActionState() |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected void updateActionState()
public void selectionChange(@NullAllowed ProductSceneView oldValue, @NullAllowed ProductSceneView newValue)
SelectionSupport.Handler
selectionChange
in interface SelectionSupport.Handler<ProductSceneView>
oldValue
- The old selection, or null
if no such existsnewValue
- The new selection, or null
if no such existspublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
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 Component getToolbarPresenter()
getToolbarPresenter
in interface org.openide.util.actions.Presenter.Toolbar
protected abstract void initActionProperties()
protected abstract boolean getActionSelectionState(ProductSceneView view)
view
- // get the selected productSceneViewprotected abstract boolean getActionEnabledState(ProductSceneView view)
protected abstract void setOverlayEnableState(ProductSceneView view)
protected ProductSceneView getSelectedProductSceneView()
protected boolean isSelected()
Copyright © 2014–2015 European Space Agency (ESA). All rights reserved.