Package com.nomagic.magicdraw.actions
Class MDActionsCategory
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.ActionsCategory
com.nomagic.magicdraw.actions.MDActionsCategory
- All Implemented Interfaces:
com.nomagic.magicdraw.actions.ShortcutSchemaAction
,ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
- Direct Known Subclasses:
DiagramInnerToolbarConfiguration
@OpenApiAll
public class MDActionsCategory
extends ActionsCategory
implements com.nomagic.magicdraw.actions.ShortcutSchemaAction
The class describes the actions' category used in MagicDraw.
This category uses
ActionsGroupController
for checking enabled/disable state of assigned relative actions group(if it has some group).- See Also:
-
Field Summary
Fields inherited from class com.nomagic.actions.ActionsCategory
ACTIONS_PROPERTY, ADDED_ACTION_PROPERTY, CHANGE_ACTIONS_PROPERTY, DISABLE_IF_EMPTY, MAX_CATEGORY_ACTIONS, REMOVE_IF_EMPTY, REMOVED_ACTION_PROPERTY, USE_AS_SEPARATOR_IN_UI
Fields inherited from class com.nomagic.actions.NMAction
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, DO_NOT_REGISTER_ACTION_TO_COMPONENTS, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorDescriptionCreates actions category with no nameMDActionsCategory
(String id, String name) Constructs the action with given id, name, mnemonic key and group.MDActionsCategory
(String id, String name, int mnemonic) Constructs the action with given id, name, mnemonic key and group.MDActionsCategory
(String id, String name, int mnemonic, String group) Constructs the action with given id, name, mnemonic key and group.MDActionsCategory
(String id, String name, KeyStroke stroke, String group) Constructs the action with given id, name, keystroke and group.MDActionsCategory
(String id, String name, KeyStroke stroke, String group, boolean useShortcutSchema) Constructs the action with given id, name, keystroke and group. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
If action has assigned relative group, takes enable flag value from this group and sets to itself.Methods inherited from class com.nomagic.actions.ActionsCategory
accept, actionPerformed, addAction, addAction, addActionNearTheGiven, addActions, breakActions, breakActions, breakActions, breakeActions, clone, createSeparatorCategory, forEach, forEachIncludingSelf, getAction, getActions, getActionsRecursively, getCategories, isDisplayHeader, isEmpty, isNested, isUseActionForDisable, removeAction, removeIf, setActions, setDisplayHeader, setNested, setUseActionForDisable, shallowClone, size, sort
Methods inherited from class com.nomagic.actions.NMAction
addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, compareTo, createMenuItem, equals, firePropertyChange, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, toString
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
Constructor Details
-
MDActionsCategory
public MDActionsCategory()Creates actions category with no name -
MDActionsCategory
public MDActionsCategory(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke, @CheckForNull String group) Constructs the action with given id, name, keystroke and group.- Parameters:
id
- the id of the actionname
- the name of the actionstroke
- the KeyStroke of the actiongroup
- the name of the related commands group
-
MDActionsCategory
public MDActionsCategory(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke, @CheckForNull String group, boolean useShortcutSchema) Constructs the action with given id, name, keystroke and group.- Parameters:
id
- the id of the actionname
- the name of the actionstroke
- the keystroke of the actiongroup
- the name of the related commands groupuseShortcutSchema
- use shortcuts schema
-
MDActionsCategory
public MDActionsCategory(@CheckForNull String id, @CheckForNull String name, int mnemonic, @CheckForNull String group) Constructs the action with given id, name, mnemonic key and group.- Parameters:
id
- the id of the actionname
- the name of the actionmnemonic
- the mnemonic key of the actiongroup
- the name of the related commands group
-
MDActionsCategory
Constructs the action with given id, name, mnemonic key and group.- Parameters:
id
- the id of the actionname
- the name of the actionmnemonic
- mnemonic char
-
MDActionsCategory
Constructs the action with given id, name, mnemonic key and group.- Parameters:
id
- the id of the actionname
- the name of the action
-
-
Method Details
-
updateState
public void updateState()If action has assigned relative group, takes enable flag value from this group and sets to itself.- Overrides:
updateState
in classNMAction
-
isUseShortcutSchema
public boolean isUseShortcutSchema()- Specified by:
isUseShortcutSchema
in interfacecom.nomagic.magicdraw.actions.ShortcutSchemaAction
- Returns:
- true if action is using schema for taking default shortcuts
-