@OpenApiAll public class MDAction extends NMAction implements com.nomagic.magicdraw.actions.ShortcutSchemaAction
ActionsGroupController
for checking enabled/disable state of assigned relative actions group(if it has some group).ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Constructor and Description |
---|
MDAction(java.lang.String id,
java.lang.String name,
int mnemonic,
java.lang.String group)
Constructs the action with given id, name, mnemonic key and group.
|
MDAction(java.lang.String id,
java.lang.String name,
javax.swing.KeyStroke stroke,
java.lang.String group)
Constructs the action with given id, name, keystroke and group.
|
MDAction(java.lang.String id,
java.lang.String name,
javax.swing.KeyStroke stroke,
java.lang.String group,
boolean useShortcutSchema)
Constructs the action with given id, name, keystroke and group.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Executes action.
|
boolean |
isUseShortcutSchema() |
void |
updateState()
If action has assigned relative group, takes enable flag value from this group and sets to itself.
|
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, forEach, forEachIncludingSelf, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removeIf, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
public MDAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group)
id
- the id of the actionname
- the name of the actionstroke
- the key stroke of the actiongroup
- the name of the related commands grouppublic MDAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group, boolean useShortcutSchema)
id
- the id of the actionname
- the name of the actionstroke
- the key stroke of the actiongroup
- the name of the related commands groupuseShortcutSchema
- use shortcuts schemapublic MDAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, int mnemonic, @CheckForNull java.lang.String group)
id
- the id of the actionname
- the name of the actionmnemonic
- the mnemonic key of the actiongroup
- the name of the related commands grouppublic void actionPerformed(@CheckForNull java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class NMAction
e
- event caused execution.public void updateState()
updateState
in class NMAction
public boolean isUseShortcutSchema()
isUseShortcutSchema
in interface com.nomagic.magicdraw.actions.ShortcutSchemaAction