public class CommandGroup extends Command
CommandGroup
is a group of commands represented by a menu item group or a tool bar.
As of BEAM 5, CommandGroup
s can also be used to collect group items. There can be either
(forward declarations of) contained command IDs or other commands group IDs or separators.Modifier and Type | Field and Description |
---|---|
static String |
ACTION_KEY_GROUP_ITEMS |
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 |
---|
CommandGroup() |
CommandGroup(String commandGroupID,
CommandStateListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
addCommandStateListener(CommandStateListener l)
Adds a command listener.
|
void |
configure(com.bc.ceres.core.runtime.ConfigurationElement config) |
protected Action |
createAction()
Creates an appropriate action instance for this command.
|
JMenuItem |
createMenuItem()
Creates a menu item (a
JMenu instance) for this command group. |
AbstractButton |
createToolBarButton()
Creates an appropriate tool bar button for this command.
|
String[] |
getGroupItems() |
void |
removeCommandStateListener(CommandStateListener l)
Removes a command listener.
|
void |
setGroupItems(String[] groupItems) |
addEventListener, configure, 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 ACTION_KEY_GROUP_ITEMS
public CommandGroup()
public CommandGroup(String commandGroupID, CommandStateListener listener)
public JMenuItem createMenuItem()
JMenu
instance) for this command group.createMenuItem
in class Command
public AbstractButton createToolBarButton()
createToolBarButton
in class Command
public void addCommandStateListener(CommandStateListener l)
l
- the command listenerpublic void removeCommandStateListener(CommandStateListener l)
l
- the command listenerpublic String[] getGroupItems()
public void setGroupItems(String[] groupItems)
public void configure(com.bc.ceres.core.runtime.ConfigurationElement config) throws com.bc.ceres.core.CoreException
protected Action createAction()
Command
createAction
in class Command
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.