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 AbstractAction
changeSupport, enabledFields inherited from interface 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 TypeMethodDescriptionvoidvoidObject[]booleanReturns true if the action is selcted.voidvoidsetSelected(boolean newValue) Changes the state of the actionMethods inherited from class BaseAction
create, createButton, createButton, evaluateEnabled, listenTo, listenTo, setBundleKey, setIcon, updateEnabledMethods inherited from class AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
addItemListenerin interfaceItemSelectable
-
getSelectedObjects
- Specified by:
getSelectedObjectsin interfaceItemSelectable
-
removeItemListener
- Specified by:
removeItemListenerin interfaceItemSelectable
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
createMenuItem
-