public final class AnimationManager

  1. Object
  2. AnimationManager
Animation manager concentrates all of the animations for a given form into a single place that allows us to manage all mutations to a Form in a way the prevents collisions between mutations. The one type of animation that isn’t handled by this class is the form level transition, replace transitions are handled by this class.

Methods

public boolean isAnimating()Returns true if an animation is currently in progress
public void addUIMutation(Container container, ComponentAnimation an)Adds a UIMutation to the animation manager.
public void addAnimation(ComponentAnimation an)Adds the animation to the end to the animation queue
public void addAnimationAndBlock(ComponentAnimation an)Adds the animation to the end of the animation queue and blocks the current thread until the animation completes
public void addAnimation(ComponentAnimation an, Runnable callback)Adds the animation to the end to the animation queue
public void addUIMutation(Container container, ComponentAnimation an, Runnable callback)Adds a UIMutation to the animation manager.
public void onTitleScrollAnimation(ComponentAnimation... cna)Performs a step animation as the user scrolls down/up the page e.g. slowly converting a title UIID from a big visual representation to a smaller title for easier navigation then back again when scrolling up
public void onTitleScrollAnimation(Container content, ComponentAnimation... cna)Performs a step animation as the user scrolls down/up the page e.g. slowly converting a title UIID from a big visual representation to a smaller title for easier navigation then back again when scrolling up
public void flushAnimation(Runnable r)Invokes the runnable when all animations have completed

Inherited methods

Method details

isAnimating

public boolean isAnimating()
Returns true if an animation is currently in progress

Returns

true if an animation is currently in progress

addUIMutation

public void addUIMutation(Container container, ComponentAnimation an)
Adds a UIMutation to the animation manager. If there are any current compatible UIMutations in the animation queue, then this mutation will be added to that mutation. Otherwise it will appended to the end of the queue to be run sequentially.

Parameters

container Container
The container that is being mutated.
an ComponentAnimation
The animation

See also

addAnimation

public void addAnimation(ComponentAnimation an)
Adds the animation to the end to the animation queue

Parameters

an ComponentAnimation
the animation object

addAnimationAndBlock

public void addAnimationAndBlock(ComponentAnimation an)
Adds the animation to the end of the animation queue and blocks the current thread until the animation completes

Parameters

an ComponentAnimation
the animation to perform

addAnimation

public void addAnimation(ComponentAnimation an, Runnable callback)
Adds the animation to the end to the animation queue

Parameters

an ComponentAnimation
the animation object
callback Runnable
invoked when the animation completes

addUIMutation

public void addUIMutation(Container container, ComponentAnimation an, Runnable callback)
Adds a UIMutation to the animation manager. If there are any current compatible UIMutations in the animation queue, then this mutation will be added to that mutation. Otherwise it will appended to the end of the queue to be run sequentially.

Parameters

container Container
The container that is being mutated.
an ComponentAnimation
The animation
callback Runnable
A callback to be run on completion.

See also

onTitleScrollAnimation

public void onTitleScrollAnimation(ComponentAnimation... cna)
Performs a step animation as the user scrolls down/up the page e.g. slowly converting a title UIID from a big visual representation to a smaller title for easier navigation then back again when scrolling up

Parameters

cna ComponentAnimation...
the animation to bind to the scroll event

onTitleScrollAnimation

public void onTitleScrollAnimation(Container content, ComponentAnimation... cna)
Performs a step animation as the user scrolls down/up the page e.g. slowly converting a title UIID from a big visual representation to a smaller title for easier navigation then back again when scrolling up

Parameters

content Container
the scrollable container representing the body
cna ComponentAnimation...
the animation to bind to the scroll event

flushAnimation

public void flushAnimation(Runnable r)
Invokes the runnable when all animations have completed

Parameters

r Runnable
the runnable that will be invoked after the animations