Class StateChangeAction
java.lang.Object
javax.swing.AbstractAction
com.inductiveautomation.ignition.client.util.action.BaseAction
com.inductiveautomation.ignition.client.util.action.StateChangeAction
- All Implemented Interfaces:
ActionListener
,ItemListener
,ItemSelectable
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
PersistentStateChangeAction
,StateChangeAction
Extends BaseAction by adding support for item events like Toggle buttons and Checkbox menu items.
- See Also:
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionStateChangeAction
(String bundleKey) StateChangeAction
(String bundleKey, Icon icon) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Object[]
boolean
Returns true if the action is selcted.void
void
setSelected
(boolean newValue) Changes the state of the actionMethods inherited from class com.inductiveautomation.ignition.client.util.action.BaseAction
create, createButton, createButton, evaluateEnabled, listenTo, listenTo, setBundleKey, setIcon, updateEnabled
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ItemListener
itemStateChanged
-
Field Details
-
selected
protected boolean selected
-
-
Constructor Details
-
StateChangeAction
-
StateChangeAction
-
-
Method Details
-
isSelected
public boolean isSelected()Returns true if the action is selcted. -
setSelected
public void setSelected(boolean newValue) Changes the state of the action- Parameters:
newValue
- true to set the selection state of the action.
-
addItemListener
- Specified by:
addItemListener
in interfaceItemSelectable
-
getSelectedObjects
- Specified by:
getSelectedObjects
in interfaceItemSelectable
-
removeItemListener
- Specified by:
removeItemListener
in interfaceItemSelectable
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
createMenuItem
-