@OpenApiAll public class MDStateAction extends NMStateAction
ActionsGroupController
for checking
enabled/disable state of assigned relative actions group(if it has some
group).DISTINGUISH, GROUPED, STATE
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 |
---|
MDStateAction(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.
|
MDStateAction(java.lang.String id,
java.lang.String name,
javax.swing.KeyStroke stroke,
java.lang.String group)
Creates the action with given id, name, key stroke, 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, getState, isDistinguish, isGrouped, setDistinguish, setGrouped, setState
addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
public MDStateAction(@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 action.name
- the name of the action.stroke
- the KeyStroke of the actiongroup
- the name of the related commands group.public MDStateAction(@CheckForNull java.lang.String id, @CheckForNull 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(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class NMStateAction
e
- event caused execution.public void updateState()
updateState
in class NMAction