org.tbee.swing
Class AnimatedTransition

java.lang.Object
  extended by java.lang.Thread
      extended by nl.knowledgeplaza.util.thread.AnimatedTransition
          extended by org.tbee.swing.AnimatedTransition
All Implemented Interfaces:
Runnable

public abstract class AnimatedTransition
extends nl.knowledgeplaza.util.thread.AnimatedTransition

Provides a generic thread for slowly moving from one value to another. Extend this class and provide a "progress" implementation, for example: private AnimatedTransition iAnimation = null; private class MyAnimation extends AnimatedTransition { public void progress(double angle) { GaugeDirection.this.setVisualAngle(angle); } public void done() { iAnimation = null; } } Make sure that you prefix the methods, so no confusion arises over the source (e.g. getValue). Use a line like below to start or replace an animation: this.animation = AnimatedTransition.newTransition(this.animation, new MyAnimation(), true, 0, 1.0, 0.01, 100); There is a special swing version which will make sure the progress runs in the swing thread.

Version:
$Revision: 1.7 $

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AnimatedTransition()
           
 
Method Summary
protected  void doProcess(double v)
          just a tad differently
protected  void waitForThreadToFinish(Thread t)
          Wait without blocking the swing thread
 
Methods inherited from class nl.knowledgeplaza.util.thread.AnimatedTransition
appendTransition, appendTransition, begin, done, getAnimate, getEndValue, getMinimumStepDelay, getStartValue, getStepFactor, getStepSize, getValue, isAnimating, newTransition, newTransition, progress, run, setAnimate, setEndValue, setMinimumStepDelay, setStartValue, setStepFactor, setStepSize, setValue
 
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, 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

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

AnimatedTransition

public AnimatedTransition()
Method Detail

doProcess

protected void doProcess(double v)
just a tad differently

Overrides:
doProcess in class nl.knowledgeplaza.util.thread.AnimatedTransition

waitForThreadToFinish

protected void waitForThreadToFinish(Thread t)
Wait without blocking the swing thread

Overrides:
waitForThreadToFinish in class nl.knowledgeplaza.util.thread.AnimatedTransition


Copyright © 2011 KnowledgePlaza. All Rights Reserved.