acm.util
Class SwingTimer

java.lang.Object
  extended by javax.swing.Timer
      extended by acm.util.SwingTimer
All Implemented Interfaces:
Serializable

public class SwingTimer
extends Timer

This class is equivalent to javax.swing.Timer and exists only to avoid the ambiguity that arises because there is also a Timer class in java.util.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.Timer
listenerList
 
Constructor Summary
SwingTimer(int rate, ActionListener listener)
          Creates a new timer that ticks at the specified rate.
 
Method Summary
 
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

SwingTimer

public SwingTimer(int rate,
                  ActionListener listener)
Creates a new timer that ticks at the specified rate. On each tick, the timer sends an ActionEvent to the listener.

Parameters:
rate - The number of milliseconds between ticks
listener - The ActionListener receiving the events