DE.purple_sunshine.bigbro
Class CountdownAnimator

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--DE.purple_sunshine.bigbro.SuspendableThread
              |
              +--DE.purple_sunshine.bigbro.CountdownAnimator
All Implemented Interfaces:
java.lang.Runnable

public class CountdownAnimator
extends SuspendableThread

The Animator controls a continuous time line and triggers the recomputation of the positions of each sprite.

Since:
JDK1.1
Version:
1.0
Author:
Holger Wagner

Field Summary
static int DEFAULT_FPS
          The default number of frames per second.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CountdownAnimator(java.util.Vector counDig, int fps, CountdownApplet applet, CountdownCanvas canvas)
           
 
Method Summary
 void run()
          While the Thread is not finishing, this calls each CountdownDigits' compute() method for each frame, removes CountdownDigits that are finished and tells the Canvas to repaint itself (that means: repaint the CountdownDigits).
When the CountdownAnimator has finished, it still sends a last newFrame() call to CountdownCanvas.
 
Methods inherited from class DE.purple_sunshine.bigbro.SuspendableThread
finish, isFinished, resume_, suspend_
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_FPS

public static final int DEFAULT_FPS
The default number of frames per second.
Constructor Detail

CountdownAnimator

public CountdownAnimator(java.util.Vector counDig,
                         int fps,
                         CountdownApplet applet,
                         CountdownCanvas canvas)
Method Detail

run

public void run()
While the Thread is not finishing, this calls each CountdownDigits' compute() method for each frame, removes CountdownDigits that are finished and tells the Canvas to repaint itself (that means: repaint the CountdownDigits).
When the CountdownAnimator has finished, it still sends a last newFrame() call to CountdownCanvas.
Overrides:
run in class java.lang.Thread


© 2000, Holger Wagner, Purple Sunshine Productions.