|
Eclipse Draw2d 3.8.0.201206011245 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.Animation
public class Animation
A utility for coordinating figure animations. During animation, multiple animators are employed to capture the initial and final states for one or more figures. The animators then playback the animation by interpolating the intermediate states for each figure using the initial and final "keyframes".
An animator is usually stateless and represents an specific technique. Any state information is stored by the Animation utility. Therefore, one instance can be used with multiple figures. Animators hook into the validation mechanism for figures and connections. These hooks are used to capture the states, and to intercept the typical layout process to insert the interpolated state.
To indicate that animation is desired, clients must call markBegin()
prior to invalidating any figures that are to be included in the animation.
After this method is called, changes are made, and run()
is invoked.
The run method will force a validation pass to capture the final states, and
then commence the animation. The animation is synchronous and the method does
not return until the animation has completed.
LayoutAnimator
Constructor Summary | |
---|---|
Animation()
|
Method Summary | |
---|---|
static java.lang.Object |
getFinalState(Animator animator,
IFigure figure)
Returns the final animation state for the given figure. |
static java.lang.Object |
getInitialState(Animator animator,
IFigure figure)
Returns the initial animation state for the given animator and figure. |
static float |
getProgress()
Returns the animation progress, where 0.0 < progress ≤ 1.0. |
static boolean |
isAnimating()
Returns true if animation is in progress. |
static boolean |
markBegin()
Marks the beginning of the animation process. |
static void |
run()
Runs animation using the recommended duration: 250 milliseconds. |
static void |
run(int duration)
Captures the final states for the animation and then plays the animation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Animation()
Method Detail |
---|
public static java.lang.Object getFinalState(Animator animator, IFigure figure)
animator
- the animator for the figurefigure
- the figure being animated
public static java.lang.Object getInitialState(Animator animator, IFigure figure)
null
is returned.
animator
- the animator for the figurefigure
- the figure being animated
public static float getProgress()
public static boolean isAnimating()
true
if animation is in progress.
true
when animatingpublic static boolean markBegin()
true
if beginning was not previously markedpublic static void run()
run(int)
public static void run(int duration)
duration
- the length of animation in milliseconds
|
Eclipse Draw2d 3.8.0.201206011245 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |