Package com.nomagic.actions
Class BaseNMStateAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.nomagic.actions.NMAction
-
- com.nomagic.actions.BaseNMStateAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,java.util.EventListener
,javax.swing.Action
- Direct Known Subclasses:
NMStateAction
,NMTriStateAction
@OpenApiAll public abstract class BaseNMStateAction extends NMAction
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GROUPED
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
-
-
Constructor Summary
Constructors Constructor Description BaseNMStateAction(java.lang.String id, java.lang.String name, int mnemonic)
Constructs the action with given id, name, mnemonic key.BaseNMStateAction(java.lang.String id, java.lang.String name, int mnemonic, java.lang.String group)
Constructs the action with given id, name, mnemonic key.BaseNMStateAction(java.lang.String id, java.lang.String name, javax.swing.KeyStroke stroke)
Creates action with given id, name, key stroke.BaseNMStateAction(java.lang.String id, java.lang.String name, javax.swing.KeyStroke stroke, java.lang.String group)
Creates action with given id, name, key stroke.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isGrouped()
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 Detail
-
GROUPED
public static final java.lang.String GROUPED
Flag indicates that in group of NMStateActions only one action can have "state" true (its radio buttons actions).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseNMStateAction
public BaseNMStateAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.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 java.lang.String id, @CheckForNull java.lang.String name, int mnemonic, @CheckForNull java.lang.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 java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.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
public BaseNMStateAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, int mnemonic)
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
-
-