uchicago.src.sim.event
Class CheckBoxListener
java.lang.Object
|
+--uchicago.src.sim.event.CheckBoxListener
- All Implemented Interfaces:
- ActionListener, EventListener
- public abstract class CheckBoxListener
- extends Object
- implements 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.
|
Method Summary |
void |
actionPerformed(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 ActionEvent actionEvent
CheckBoxListener
public CheckBoxListener()
actionPerformed
public void actionPerformed(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 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.
Bug reports and feature requests to RePast