Class AbstractOverlayAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.esa.snap.rcp.actions.layer.overlay.AbstractOverlayAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,SelectionSupport.Handler<ProductSceneView>
,org.openide.util.actions.Presenter
,org.openide.util.actions.Presenter.Menu
,org.openide.util.actions.Presenter.Popup
,org.openide.util.actions.Presenter.Toolbar
- Direct Known Subclasses:
OverlayGcpLayerAction
,OverlayGeometryLayerAction
,OverlayGraticuleLayerAction
,OverlayNoDataLayerAction
,OverlayPinLayerAction
,OverlayWorldMapLayerAction
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>
Monitor the state of overlays to either be enable or disable.- See Also:
- Serialized Form
-
-
Field Summary
-
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
AbstractOverlayAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
updateActionState
protected void updateActionState()
-
selectionChange
public void selectionChange(@NullAllowed ProductSceneView oldValue, @NullAllowed ProductSceneView newValue)
Description copied from interface:SelectionSupport.Handler
Called if a selection changed.- Specified by:
selectionChange
in interfaceSelectionSupport.Handler<ProductSceneView>
- Parameters:
oldValue
- The old selection, ornull
if no such existsnewValue
- The new selection, ornull
if no such exists
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interfaceActionListener
-
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
-
getToolbarPresenter
public Component getToolbarPresenter()
- Specified by:
getToolbarPresenter
in interfaceorg.openide.util.actions.Presenter.Toolbar
-
initActionProperties
protected abstract void initActionProperties()
-
getActionSelectionState
protected abstract boolean getActionSelectionState(ProductSceneView view)
Compute the state of a ProductSceneView that is selected.- Parameters:
view
- // get the selected productSceneView- Returns:
- // return the state of the Overlay within the ProductSceneView
-
getActionEnabledState
protected abstract boolean getActionEnabledState(ProductSceneView view)
-
setOverlayEnableState
protected abstract void setOverlayEnableState(ProductSceneView view)
-
getSelectedProductSceneView
protected ProductSceneView getSelectedProductSceneView()
-
isSelected
protected boolean isSelected()
-
-