uchicago.src.sim.event
Class CheckBoxListener

java.lang.Object
  extended by 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.

Version:
$Revision: 1.4 $ $Date: 2004/11/03 19:51:06 $
Author:
Nick Collier

Field Summary
protected  java.awt.event.ActionEvent actionEvent
           
protected  boolean isSelected
           
 
Constructor Summary
CheckBoxListener()
           
 
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
 

Field Detail

isSelected

protected boolean isSelected

actionEvent

protected java.awt.event.ActionEvent actionEvent
Constructor Detail

CheckBoxListener

public CheckBoxListener()
Method Detail

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.