Package com.nomagic.actions
Class NMTriStateAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.BaseNMStateAction
com.nomagic.actions.NMTriStateAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
- Direct Known Subclasses:
MDTriStateAction
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.nomagic.actions.BaseNMStateAction
GROUPED
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
ConstructorDescriptionNMTriStateAction
(String id, String name, int mnemonic) NMTriStateAction
(String id, String name, int mnemonic, String group) NMTriStateAction
(String id, String name, KeyStroke stroke) NMTriStateAction
(String id, String name, KeyStroke stroke, String group) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ActionsVisitor visitor) Accepts ActionsVisitor using Visitor design pattern.void
Executes given action.getState()
void
setMixedIconSupplier
(Supplier<Icon> mixedIconSupplier) void
setSelectedIconSupplier
(Supplier<Icon> selectedIconSupplier) void
Sets action String state.void
setUnselectedIconSupplier
(Supplier<Icon> unselectedIconSupplier) Methods inherited from class com.nomagic.actions.BaseNMStateAction
isGrouped, setGrouped
Methods inherited from class com.nomagic.actions.NMAction
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
-
TRI_STATE
The state property. Value of this property is an enumeration- See Also:
-
-
Constructor Details
-
NMTriStateAction
-
NMTriStateAction
-
NMTriStateAction
-
NMTriStateAction
-
-
Method Details
-
setState
Sets action String state.- Parameters:
state
- new state of action.
-
getState
- Returns:
- the state of the action
-
setMixedIconSupplier
-
setSelectedIconSupplier
-
setUnselectedIconSupplier
-
actionPerformed
Executes given action.- Specified by:
actionPerformed
in interfaceActionListener
- Specified by:
actionPerformed
in classNMAction
- Parameters:
e
- event caused execution.
-
accept
Accepts ActionsVisitor using Visitor design pattern.
-