Package ucar.unidata.ui
Class BAMutil.ActionToggle
java.lang.Object
javax.swing.AbstractAction
ucar.unidata.ui.BAMutil.ActionToggle
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Enclosing class:
BAMutil
This wraps a regular action and makes it into a "toggle action",
and associates it with an AbstractButton.
Fetch/set the toggle state on the original action using:
Boolean state = (Boolean) act.getValue(BAMutil.STATE); act.putValue(BAMutil.STATE, new Boolean(state));It will automatically change the button state if the action state changes.
- See Also:
-
Field Summary
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
Constructors -
Method Summary
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
ActionToggle
_more_- Parameters:
oa
-b
-
-
-
Method Details
-
actionPerformed
_more_- Parameters:
e
-
-