|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbluegammon.gui.animation.AnimationEngine
Animation engine, handles all animation logic.
Works together with an implementation of a RepaintRequestable
This animation engine uses a primitive mechanism when
deciding what interval to update all animations - it uses the minimum
interval value returned amongst all active animations in the engine. Hence,
all animations should return a common least denominator in their
getInterval()
.
Constructor Summary | |
AnimationEngine(RepaintRequestable canvas)
Creates an animation engine for specified canvas. |
Method Summary | |
void |
addAnimation(Animation a)
Adds an animation. |
void |
paint(javax.microedition.lcdui.Graphics g)
Paints all animations on specified graphics context |
void |
remove(Animation anim)
Removes an animation. |
void |
removeAll()
Removes all animations |
void |
run()
Updates all animations in queue if needed, and waits minimum amount of time as declared by animations. |
void |
shutdown()
Shuts down the animation engine. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnimationEngine(RepaintRequestable canvas)
canvas
- The canvas that will be animated upon.Method Detail |
public void addAnimation(Animation a)
a
- The animation to addpublic void remove(Animation anim)
anim
- The animation to removepublic void removeAll()
public void shutdown()
public void paint(javax.microedition.lcdui.Graphics g)
g
- The graphics contextpublic void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |