Package com.nomagic.actions
Class BaseNMStateAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.BaseNMStateAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
- Direct Known Subclasses:
NMStateAction
,NMTriStateAction
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Flag indicates that in group of NMStateActions only one action can have "state" true (its radio buttons actions).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
ConstructorDescriptionBaseNMStateAction
(String id, String name, int mnemonic) Constructs the action with given id, name, mnemonic key.BaseNMStateAction
(String id, String name, int mnemonic, String group) Constructs the action with given id, name, mnemonic key.BaseNMStateAction
(String id, String name, KeyStroke stroke) Creates action with given id, name, key stroke.BaseNMStateAction
(String id, String name, KeyStroke stroke, String group) Creates action with given id, name, key stroke. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return grouped property value.void
setGrouped
(boolean grouped) Sets new grouped property value.Methods inherited from class com.nomagic.actions.NMAction
accept, actionPerformed, 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, updateState
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
Field Details
-
GROUPED
Flag indicates that in group of NMStateActions only one action can have "state" true (its radio buttons actions).- See Also:
-
-
Constructor Details
-
BaseNMStateAction
public BaseNMStateAction(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke, @CheckForNull String group) Creates action with given id, name, key stroke.- Parameters:
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.
-
BaseNMStateAction
public BaseNMStateAction(@CheckForNull String id, @CheckForNull String name, int mnemonic, @CheckForNull String group) Constructs the action with given id, name, mnemonic key.- Parameters:
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.
-
BaseNMStateAction
public BaseNMStateAction(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke) Creates action with given id, name, key stroke.- Parameters:
id
- the id of the action.name
- the name of the action.stroke
- the key stroke of the action
-
BaseNMStateAction
Constructs the action with given id, name, mnemonic key.- Parameters:
id
- the id of the action.name
- the name of the action.mnemonic
- the mnemonic key of the action
-
-
Method Details
-
isGrouped
public boolean isGrouped()Return grouped property value.- Returns:
- true if this action is grouped state action.
-
setGrouped
public void setGrouped(boolean grouped) Sets new grouped property value.- Parameters:
grouped
- new value of grouped flag.
-