org.esa.beam.framework.ui.command
Class ExecCommand

java.lang.Object
  extended by org.esa.beam.framework.ui.command.Command
      extended by org.esa.beam.framework.ui.command.SelectableCommand
          extended by org.esa.beam.framework.ui.command.ExecCommand
All Implemented Interfaces:
com.bc.ceres.core.runtime.ConfigurableExtension
Direct Known Subclasses:
AboutAction, AbstractExportImageAction, AppCommand, AttachPixelGeoCodingAction, BandMathsAction, CloseAction, CloseAllAction, CloseSessionAction, CollapseMetadataTableAction, ComputeMaskAreaAction, CreateAsarNrcsBandsAction, CreateDemRelatedBandsAction, CreateFilteredBandAction, CreateSubsetFromViewAction, CreateVectorDataNodeAction, CreateXYDisplacementBandsAction, DetachPixelGeoCodingAction, ExitAction, ExpandMetadataTableAction, ExportColorPaletteAction, ExportEnviGcpFileAction, ExportGeometryAction, ExportKmzFileAction, ExportMaskPixelsAction, ExportMetadataAction, ExportTransectPixelsAction, FlippingAction, HelpTopicsAction, ImportTrackAction, ImportVectorDataNodeFromCsvAction, ImportVectorDataNodeFromMermaidAction, ImportVectorDataNodeFromShapefileAction, NewAction, OpenAction, OpenSessionAction, PreferencesAction, ProcessorAction, ProductExportAction, ProductGrabberAction, ProductImportAction, PropertiesAction, SaveAction, SaveAsAction, SaveSessionAction, SaveSessionAsAction, ShowDataSourcesAction, ShowGcpOverlayAction, ShowGeometryOverlayAction, ShowGraticuleOverlayAction, ShowHomePageAction, ShowImageViewAction, ShowImageViewRGBAction, ShowMetadataViewAction, ShowModuleManagerAction, ShowNoDataOverlayAction, ShowPinOverlayAction, ShowPlacemarkViewAction, ShowStatusBarAction, ShowToolBarAction, ShowWorldMapOverlayAction

public class ExecCommand
extends SelectableCommand
implements com.bc.ceres.core.runtime.ConfigurableExtension

The ExecCommand is an ...

Version:
$Revision$ $Date$
Author:
Norman Fomferra

Field Summary
static String TOGGLE_ACTION_KEY
           
 
Fields inherited from class org.esa.beam.framework.ui.command.SelectableCommand
SELECTED_ACTION_KEY
 
Fields inherited from class org.esa.beam.framework.ui.command.Command
ACTION_KEY_CONTEXT, ACTION_KEY_LARGE_ICON, ACTION_KEY_LOCATION, ACTION_KEY_PARENT, ACTION_KEY_PLACE_AFTER, ACTION_KEY_PLACE_BEFORE, ACTION_KEY_PLACE_CONTEXT_TOP, ACTION_KEY_POPUP_TEXT, ACTION_KEY_SEPARATOR_AFTER, ACTION_KEY_SEPARATOR_BEFORE, ACTION_KEY_SORT_CHILDREN, HELP_ID_KEY
 
Constructor Summary
ExecCommand()
           
ExecCommand(String commandID)
           
ExecCommand(String commandID, CommandListener listener)
           
 
Method Summary
 void addCommandListener(CommandListener l)
          Adds a command listener.
 void configure(com.bc.ceres.core.runtime.ConfigurationElement config)
           
 void configure(ResourceBundle resourceBundle)
          Configures this command with the properties (if any) found in the given recource bundle.
 JMenuItem createMenuItem()
          Creates a menu item (a JMenuItem or JCheckBoxMenuItem instance) for this command group.
 AbstractButton createToolBarButton()
          Creates an appropriate tool bar button for this command.
 void execute()
          Executes this command.
 void execute(Object argument)
          Executes this command with the given command-specific argument.
protected  void fireActionPerformed(ActionEvent actionEvent, Object argument)
          Notify all listeners that have registered interest for notification on the 'action performed' event type.
 boolean isToggle()
           
 void removeCommandListener(CommandListener l)
          Removes a command listener.
 void setToggle(boolean toggle)
           
 
Methods inherited from class org.esa.beam.framework.ui.command.SelectableCommand
actionPerformed, createAction, isSelected, setSelected
 
Methods inherited from class org.esa.beam.framework.ui.command.Command
addEventListener, containsContext, containsLocation, containsProperty, containsPropertyValue, createResourceKey, fireUpdateState, getAccelerator, getAction, getCommandID, getCommandUIFactory, getConfigBoolean, getConfigIcon, getConfigString, getConfigStrings, getContexts, getEventListenerList, getHelpId, getLargeIcon, getLocations, getLongDescription, getMnemonic, getParent, getPlaceAfter, getPlaceBefore, getPopupText, getProperty, getProperty, getProperty, getProperty, getResourceBoolean, getResourceIcon, getResourceString, getResourceStringArray, getResourceStrings, getShortDescription, getSmallIcon, getSortChildren, getText, getValue, isEnabled, isPlaceAtContextTop, isSeparatorAfter, isSeparatorBefore, removeEventListener, setAccelerator, setCommandID, setCommandUIFactory, setContexts, setEnabled, setHelpId, setLargeIcon, setLocations, setLongDescription, setMnemonic, setParent, setPlaceAfter, setPlaceAtContextTop, setPlaceBefore, setPopupText, setProperty, setProperty, setSeparatorAfter, setSeparatorBefore, setShortDescription, setSmallIcon, setText, toString, updateComponentTreeUI, updateState, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOGGLE_ACTION_KEY

public static final String TOGGLE_ACTION_KEY
See Also:
Constant Field Values
Constructor Detail

ExecCommand

public ExecCommand()

ExecCommand

public ExecCommand(String commandID)

ExecCommand

public ExecCommand(String commandID,
                   CommandListener listener)
Method Detail

isToggle

public boolean isToggle()

setToggle

public void setToggle(boolean toggle)

execute

public void execute()
Executes this command.


execute

public void execute(Object argument)
Executes this command with the given command-specific argument.


createMenuItem

public JMenuItem createMenuItem()
Creates a menu item (a JMenuItem or JCheckBoxMenuItem instance) for this command group.

Specified by:
createMenuItem in class Command

createToolBarButton

public AbstractButton createToolBarButton()
Creates an appropriate tool bar button for this command.

Specified by:
createToolBarButton in class Command

addCommandListener

public void addCommandListener(CommandListener l)
Adds a command listener.

Overrides:
addCommandListener in class SelectableCommand
Parameters:
l - the command listener

removeCommandListener

public void removeCommandListener(CommandListener l)
Removes a command listener.

Overrides:
removeCommandListener in class SelectableCommand
Parameters:
l - the command listener

fireActionPerformed

protected void fireActionPerformed(ActionEvent actionEvent,
                                   Object argument)
Notify all listeners that have registered interest for notification on the 'action performed' event type. The event instance is lazily created using the parameters passed into the fire method.

Overrides:
fireActionPerformed in class SelectableCommand

configure

public void configure(ResourceBundle resourceBundle)
Configures this command with the properties (if any) found in the given recource bundle. Overrides the base class implementation in order to configure the following extra properties:

  • command.command-ID.toggle = true or false
  • Overrides:
    configure in class SelectableCommand
    Parameters:
    resourceBundle - the resource bundle from which the properties are received
    Throws:
    IllegalArgumentException - if the recource bundle is null

    configure

    public void configure(com.bc.ceres.core.runtime.ConfigurationElement config)
                   throws com.bc.ceres.core.CoreException
    Specified by:
    configure in interface com.bc.ceres.core.runtime.ConfigurableExtension
    Overrides:
    configure in class SelectableCommand
    Throws:
    com.bc.ceres.core.CoreException


    Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.