ucar.unidata.ui
Class BAMutil.ActionToggle

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ucar.unidata.ui.BAMutil.ActionToggle
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Enclosing class:
BAMutil

public static class BAMutil.ActionToggle
extends AbstractAction

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:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
BAMutil.ActionToggle(Action oa, AbstractButton b)
          _more_
 
Method Summary
 void actionPerformed(ActionEvent e)
          _more_
 
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
 

Constructor Detail

BAMutil.ActionToggle

public BAMutil.ActionToggle(Action oa,
                            AbstractButton b)
_more_

Parameters:
oa -
b -
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
_more_

Parameters:
e -