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

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.ToolCommand
All Implemented Interfaces:
com.bc.ceres.core.runtime.ConfigurableExtension
Direct Known Subclasses:
ToolAction

public class ToolCommand
extends SelectableCommand

A command which activates a tool.

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

Field Summary
 
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
ToolCommand(String commandID)
           
ToolCommand(String commandID, CommandStateListener listener, com.bc.ceres.swing.figure.Interactor interactor)
           
 
Method Summary
 void addCommandStateListener(CommandStateListener l)
          Adds a command state listener.
protected  Action createAction()
          Creates an appropriate action instance for this command.
 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.
 com.bc.ceres.swing.figure.Interactor getInteractor()
           
 void removeCommandStateListener(CommandStateListener l)
          Removes a command state listener.
 void setInteractor(com.bc.ceres.swing.figure.Interactor interactor)
           
 
Methods inherited from class org.esa.beam.framework.ui.command.SelectableCommand
actionPerformed, addCommandListener, configure, configure, fireActionPerformed, isSelected, removeCommandListener, 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
 

Constructor Detail

ToolCommand

public ToolCommand(String commandID)

ToolCommand

public ToolCommand(String commandID,
                   CommandStateListener listener,
                   com.bc.ceres.swing.figure.Interactor interactor)
Method Detail

getInteractor

public com.bc.ceres.swing.figure.Interactor getInteractor()

setInteractor

public final void setInteractor(com.bc.ceres.swing.figure.Interactor interactor)

addCommandStateListener

public void addCommandStateListener(CommandStateListener l)
Adds a command state listener.

Parameters:
l - the command listener

removeCommandStateListener

public void removeCommandStateListener(CommandStateListener l)
Removes a command state listener.

Parameters:
l - the command listener

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

createAction

protected Action createAction()
Description copied from class: Command
Creates an appropriate action instance for this command.

Overrides:
createAction in class SelectableCommand


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