utilities
Class Timer

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

public abstract 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 defined in a subclass.

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

Constructor Summary
Timer(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, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, isRunning, removeActionListener, restart, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats, start, stop
 
Methods inherited from class java.lang.Object
equals, 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 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.