org.xnap.action
Class AbstractToggleAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.xnap.action.AbstractToggleAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ToggleAction
Direct Known Subclasses:
AbstractTogglePrefAction, AbstractToggleReversedPrefAction, EnableAction, PanelAction

public abstract class AbstractToggleAction
extends javax.swing.AbstractAction
implements ToggleAction

Provides a default implementation for toggeable Action objects.

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
AbstractToggleAction()
          Constructor an AbstractToggleAction that is not selected by default.
AbstractToggleAction(boolean selected)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 boolean isSelected()
          Returns the selected state for the action.
 void setSelected(boolean newValue)
          Sets the selected state for the action.
abstract  void toggled(boolean selected)
          Invoked when the selection changes.
 
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
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

AbstractToggleAction

public AbstractToggleAction(boolean selected)

AbstractToggleAction

public AbstractToggleAction()
Constructor an AbstractToggleAction that is not selected by default.

Method Detail

isSelected

public boolean isSelected()
Description copied from interface: ToggleAction
Returns the selected state for the action.

Specified by:
isSelected in interface ToggleAction

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

toggled

public abstract void toggled(boolean selected)
Invoked when the selection changes.


setSelected

public void setSelected(boolean newValue)
Description copied from interface: ToggleAction
Sets the selected state for the action.

Specified by:
setSelected in interface ToggleAction


Copyright © 2001-2005 XNap Team. All Rights Reserved.