Class 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