|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yost.util.AnimationExecutor
public class AnimationExecutor
An Executor
-like class that executes
animation tasks serially in the AWT Event Thread.
This class allows you to manage type-ahead or click-ahead
in situations where each user input starts an animation.
An animation is typically a chain of runnables,
starting with a runnable that runs in the Event thread,
which chains to a runnable that does a delay in another thread,
which chains to another runnable that runs in the Event thread
(using invokeLater
),
and so on until a final runnable runs in the Event thread.
Here is a scenario to show how this class works.
This executor doesn't run a Runnable
.
Instead it runs an AnimationExecutor.Task
,
which has a run
method
that takes two arguments.
The first argument tells the task whether any other animations are queued.
The second argument is a Runnable
the task must run when it completes.
http://Yost.com/computers/java/AnimationExecutor Public Domain
Nested Class Summary | |
---|---|
static interface |
AnimationExecutor.Task
The animation task to be run. |
Constructor Summary | |
---|---|
AnimationExecutor()
|
Method Summary | |
---|---|
void |
execute(AnimationExecutor.Task task)
Execute a task in the Event thread, serialized with all other tasks submitted via this executor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimationExecutor()
Method Detail |
---|
public void execute(AnimationExecutor.Task task)
task
- EventThreadSerializedExecutor.Task
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |