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:
  • Constructor Details

    • AbstractOverlayAction

      protected AbstractOverlayAction()
  • Method Details

    • 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 interface SelectionSupport.Handler<ProductSceneView>
      Parameters:
      oldValue - The old selection, or null if no such exists
      newValue - The new selection, or null if no such exists
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getMenuPresenter

      public JMenuItem getMenuPresenter()
      Specified by:
      getMenuPresenter in interface org.openide.util.actions.Presenter.Menu
    • getPopupPresenter

      public JMenuItem getPopupPresenter()
      Specified by:
      getPopupPresenter in interface org.openide.util.actions.Presenter.Popup
    • getToolbarPresenter

      public Component getToolbarPresenter()
      Specified by:
      getToolbarPresenter in interface org.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()