org.xnap.commons.gui.action
Class AbstractToggleAction
java.lang.Object
javax.swing.AbstractAction
org.xnap.commons.gui.action.AbstractXNapAction
org.xnap.commons.gui.action.AbstractToggleAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action, ToggleAction
- Direct Known Subclasses:
- AbstractToggleSettingAction, TableHeaderMenu.MaintainSortOrderAction
public abstract class AbstractToggleAction
- extends AbstractXNapAction
- implements ToggleAction
Provides a default implementation for toggeable Action
objects.
- See Also:
- Serialized Form
AbstractToggleAction
public AbstractToggleAction(boolean selected)
AbstractToggleAction
public AbstractToggleAction()
- Constructor an AbstractToggleAction that is not selected by default.
isSelected
public boolean isSelected()
- Returns the state of the action.
- Specified by:
isSelected
in interface ToggleAction
- Returns:
- true, if the action is currently in active state, e.g. selected
in case of a
JToggleButton
actionPerformed
public void actionPerformed(ActionEvent event)
- Specified by:
actionPerformed
in interface ActionListener
toggled
public abstract void toggled(boolean selected)
- Invoked when the selection changes.
setSelected
public void setSelected(boolean newValue)
- Sets the state of the action.
- Specified by:
setSelected
in interface ToggleAction
- Parameters:
newValue
- if true, the action is set to active state
Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.