Class Animation
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.
- Since:
- 3.2
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectgetFinalState(Animator animator, IFigure figure) Returns the final animation state for the given figure.static ObjectgetInitialState(Animator animator, IFigure figure) Returns the initial animation state for the given animator and figure.static floatReturns the animation progress, where 0.0 < progress ≤ 1.0.static booleanReturnstrueif animation is in progress.static booleanMarks the beginning of the animation process.static voidrun()Runs animation using the recommended duration: 250 milliseconds.static voidrun(int duration) Captures the final states for the animation and then plays the animation.
- 
Constructor Details- 
Animationpublic Animation()
 
- 
- 
Method Details- 
getFinalStateReturns the final animation state for the given figure.- Parameters:
- animator- the animator for the figure
- figure- the figure being animated
- Returns:
- the final state
- Since:
- 3.2
 
- 
getInitialStateReturns the initial animation state for the given animator and figure. If no state was recorded,nullis returned.- Parameters:
- animator- the animator for the figure
- figure- the figure being animated
- Returns:
- the initial state
- Since:
- 3.2
 
- 
getProgresspublic static float getProgress()Returns the animation progress, where 0.0 < progress ≤ 1.0.- Returns:
- the progress of the animation
- Since:
- 3.2
 
- 
isAnimatingpublic static boolean isAnimating()Returnstrueif animation is in progress.- Returns:
- truewhen animating
- Since:
- 3.2
 
- 
markBeginpublic static boolean markBegin()Marks the beginning of the animation process. If the beginning has already been marked, this has no effect.- Returns:
- returns trueif beginning was not previously marked
- Since:
- 3.2
 
- 
runpublic static void run()Runs animation using the recommended duration: 250 milliseconds.- Since:
- 3.2
- See Also:
 
- 
runpublic static void run(int duration) Captures the final states for the animation and then plays the animation.- Parameters:
- duration- the length of animation in milliseconds
- Since:
- 3.2
 
 
-