public class ExecCommand extends SelectableCommand implements com.bc.ceres.core.runtime.ConfigurableExtension
ExecCommand
is an ...Modifier and Type | Field and Description |
---|---|
static String |
TOGGLE_ACTION_KEY |
SELECTED_ACTION_KEY
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_PLACE_FIRST, ACTION_KEY_PLACE_LAST, ACTION_KEY_POPUP_TEXT, ACTION_KEY_SEPARATOR_AFTER, ACTION_KEY_SEPARATOR_BEFORE, ACTION_KEY_SORT_CHILDREN, HELP_ID_KEY
Constructor and Description |
---|
ExecCommand() |
ExecCommand(String commandID) |
ExecCommand(String commandID,
CommandListener listener) |
Modifier and Type | Method and Description |
---|---|
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) |
actionPerformed, createAction, isSelected, setSelected
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, getPlaceFirst, getPlaceLast, 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, setPlaceFirst, setPlaceLast, setPopupText, setProperty, setProperty, setSeparatorAfter, setSeparatorBefore, setShortDescription, setSmallIcon, setText, toString, updateComponentTreeUI, updateState, updateState
public static final String TOGGLE_ACTION_KEY
public ExecCommand()
public ExecCommand(String commandID)
public ExecCommand(String commandID, CommandListener listener)
public boolean isToggle()
public void setToggle(boolean toggle)
public void execute()
public void execute(Object argument)
public JMenuItem createMenuItem()
JMenuItem
or JCheckBoxMenuItem
instance) for this command
group.createMenuItem
in class Command
public AbstractButton createToolBarButton()
createToolBarButton
in class Command
public void addCommandListener(CommandListener l)
addCommandListener
in class SelectableCommand
l
- the command listenerpublic void removeCommandListener(CommandListener l)
removeCommandListener
in class SelectableCommand
l
- the command listenerprotected void fireActionPerformed(ActionEvent actionEvent, Object argument)
fireActionPerformed
in class SelectableCommand
public void configure(ResourceBundle resourceBundle)
command.
command-ID.toggle = true
or false
configure
in class SelectableCommand
resourceBundle
- the resource bundle from which the properties are receivedIllegalArgumentException
- if the recource bundle is nullpublic void configure(com.bc.ceres.core.runtime.ConfigurationElement config) throws com.bc.ceres.core.CoreException
configure
in interface com.bc.ceres.core.runtime.ConfigurableExtension
configure
in class SelectableCommand
com.bc.ceres.core.CoreException
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.