@OpenApiAll public class SelectionStateItem extends NMStateAction implements ListItem, com.nomagic.actions.ShortcutsNotCustomizable
SelectItemAction
,
Serialized FormModifier and Type | Field and Description |
---|---|
java.lang.String |
propertyName
Property name of PropertyChangeEvent which will be fired when this action will be executed.
|
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 |
---|
SelectionStateItem(java.lang.String id,
java.lang.Object value,
java.lang.String propertyName)
Creates new action.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Fires property change event with name this.propertyName and with new value this.value,
and null old value.
|
java.lang.Object |
getValue()
Returns value of this action.
|
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, updateState
public java.lang.String propertyName
public SelectionStateItem(@CheckForNull java.lang.String id, java.lang.Object value, java.lang.String propertyName)
id
- action idvalue
- action value, action name is created from value.toString method.propertyName
- Property name of event which will be fired when this action will be executed.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class NMStateAction
e
- event caused execution.