@OpenApiAll public class MDAction extends NMAction
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
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.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Executes action.
|
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, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, hashCode, isIDGenerated, removeAction, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, shallowClone, toString
public MDAction(@CheckForNull java.lang.String id, java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group)
id
- the id of the action.name
- the name of the action.stroke
- the key stroke of the actiongroup
- the name of the related commands group.public MDAction(java.lang.String id, java.lang.String name, int mnemonic, @CheckForNull java.lang.String group)
id
- the id of the action.name
- the name of the action.mnemonic
- the mnemonic key of the actiongroup
- the name of the related commands group.public 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