uchicago.src.sim.event
Class SliderListener

java.lang.Object
  extended by uchicago.src.sim.event.SliderListener
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener

public abstract class SliderListener
extends java.lang.Object
implements javax.swing.event.ChangeListener

Abstract implementation of a ChangeListener. Will call the execute method whenever the JSlider being listened to fires a ChangeEvent, that is, whenever the slider is moved the execute() method will be called. A modeler will implement this execute() method. Two variables are available for use in the execute method.

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

Field Summary
protected  boolean isAdjusting
           
protected  boolean isSlidingLeft
           
protected  int prevValue
           
protected  int value
           
 
Constructor Summary
SliderListener()
           
 
Method Summary
abstract  void execute()
          Called whenever the JSlider for which this is a listener is moved.
 void setFirstVal(int val)
           
 void stateChanged(javax.swing.event.ChangeEvent evt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prevValue

protected int prevValue

value

protected int value

isAdjusting

protected boolean isAdjusting

isSlidingLeft

protected boolean isSlidingLeft
Constructor Detail

SliderListener

public SliderListener()
Method Detail

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent evt)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

setFirstVal

public void setFirstVal(int val)

execute

public abstract void execute()
Called whenever the JSlider for which this is a listener is moved.