org.formaria.swing.animation
Class AnimationThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.formaria.swing.animation.AnimationThread
All Implemented Interfaces:
java.lang.Runnable

public class AnimationThread
extends java.lang.Thread

A thread to control the animation of one or more animation objects.

Copyright (c) Formaria Ltd., 2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.

$Revision: 1.16 $


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.util.Vector animationObjects
          The objects controller by this thread
protected  Animation animationThread
          A self reference
protected  AnimationObject currentAnimationObject
           
protected  boolean isLoop
          Flag indication if the animation runs as a continuous loop
protected  long loopTime
          The length of the animation loop in milliseconds
protected  long numLoops
          The number of times to play the animation
protected  long numSteps
          The number of steps in a single animation loop, by default Long.MAX_VALUE steps per cycle
protected  long sleepTime
          The sleep time in milliseconds
protected  long startTime
          The start time
protected  long tickCount
          The current tick count
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AnimationThread()
          Creates a new instance of AnimationThread
 
Method Summary
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

animationObjects

protected java.util.Vector animationObjects
The objects controller by this thread


animationThread

protected Animation animationThread
A self reference


sleepTime

protected long sleepTime
The sleep time in milliseconds


startTime

protected long startTime
The start time


tickCount

protected long tickCount
The current tick count


isLoop

protected boolean isLoop
Flag indication if the animation runs as a continuous loop


numLoops

protected long numLoops
The number of times to play the animation


numSteps

protected long numSteps
The number of steps in a single animation loop, by default Long.MAX_VALUE steps per cycle


loopTime

protected long loopTime
The length of the animation loop in milliseconds


currentAnimationObject

protected AnimationObject currentAnimationObject
Constructor Detail

AnimationThread

public AnimationThread()
Creates a new instance of AnimationThread