uchicago.src.sim.event
Class CheckBoxListener
java.lang.Object
uchicago.src.sim.event.CheckBoxListener
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public abstract class CheckBoxListener
- extends java.lang.Object
- implements java.awt.event.ActionListener
Abstract implementation of a actionListener customized for a JCheckBox.
When the checkbox is clicked the execute() method will be called. A
modeler will implement this execute() method to provide the appropriate
functionality.
The following values are available to sub-classes.
- isSelected - a boolean value indicating whether the checkbox is
selected.
- actionEvent - the java.awt.event.ActionEvent fired by the checkbox.
- Version:
- $Revision: 1.4 $ $Date: 2004/11/03 19:51:06 $
- Author:
- Nick Collier
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Reponds to ActionEvent fired by a JCheckBox. |
abstract void |
execute()
Called whenever the JCheckBox for which this is a listener is
clicked. |
void |
setSelected(boolean isSelected)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isSelected
protected boolean isSelected
actionEvent
protected java.awt.event.ActionEvent actionEvent
CheckBoxListener
public CheckBoxListener()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- Reponds to ActionEvent fired by a JCheckBox. This method sets
this isSelected ivar and the actionEvent and then calls the user
implemented execute() method.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
setSelected
public void setSelected(boolean isSelected)
execute
public abstract void execute()
- Called whenever the JCheckBox for which this is a listener is
clicked. A user can check for selection with the isSelected ivar.