cse115.utilities
Class Timer

java.lang.Object
  extended by javax.swing.Timer
      extended by cse115.utilities.Timer
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MotionTimer

public class Timer
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 overridden 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
Timer(Integer delay)
          Creates a new instance of Timer with the given delay (in milliseconds)
 
Method Summary
 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

Timer

public Timer(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 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.