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

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:
  • Constructor Details

  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      _more_
      Parameters:
      e -