cse115.utilities
Class AbstractTimer

java.lang.Object
  extended by javax.swing.Timer
      extended by cse115.utilities.AbstractTimer
All Implemented Interfaces:
Serializable

public abstract class AbstractTimer
extends Timer

A timer object that will call a method every unit of time. The method that is called after every delay is public void activate() and needs to be defined in a subclass.

Author:
Michael Kozelsky Created on: Jul 28, 2006 Timer.java
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.Timer
listenerList
 
Constructor Summary
AbstractTimer(Integer delay)
          Creates a new instance of Timer with the given delay (in milliseconds)
 
Method Summary
abstract  void activate()
          When the timer is started, this method gets called repeatedly with the delay specified in the constructor.
 
Methods inherited from class javax.swing.Timer
addActionListener, fireActionPerformed, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTimer

public AbstractTimer(Integer delay)
Creates a new instance of Timer with the given delay (in milliseconds)

Parameters:
delay - the time to elapse in between activations of the timer. Timer is initialized in the stopped position (must be started).
Method Detail

activate

public abstract void activate()
When the timer is started, this method gets called repeatedly with the delay specified in the constructor. Must be overriden to do something useful.