public abstract class ComponentAnimation

  1. Object
  2. ComponentAnimation

Known subtypesComponentAnimation.UIMutation

Parent class representing an animation object within the AnimationManager queue.

Nested types

class ComponentAnimation.UIMutationA special kind of ComponentAnimation that encapsulates a mutation of the user interface.

Constructors

public ComponentAnimation()

Methods

public static ComponentAnimation compoundAnimation(ComponentAnimation... anims)Allows us to create an animation that compounds several separate animations so they appear as a single animation to the system and process in parallel
public static ComponentAnimation sequentialAnimation(ComponentAnimation... anims)Allows us to create an animation that places several separate animations in a sequence so they appear as a single animation to the system and process one after the other
public void addOnCompleteCall(Runnable r)Invokes the runnable just as the animation finishes thus allowing cleanup of the UI for the upcoming animations, this is useful when running a complex sequence
public boolean isStepModeSupported()Step mode allows stepping thru an animation one frame at a time, e.g. when scrolling down an animation might change title elements then change them back as we scroll up.
public int getStep()
public void setStep(int step)Sets the current animation step to a value between 0 and maxSteps
public int getMaxSteps()The total number of steps in this animation.
public abstract boolean isInProgress()Indicates if the animation is in progress
protected abstract void updateState()Updates the animation state
public final void updateAnimationState()Invoked by the animation manager internally
public final void completeAnimation()Completes the animation if needed, without forcing an additional updateState() call.
public void flush()Flushes the animation immediately, this will be called if the form is de-initialized
public final void setNotifyLock(Object l)This method is used internally by the addAnimationAndBlock method of AnimationManager and shouldn’t be used outside of that.
public final void setOnCompletion(Runnable r)This method is used internally by the addAnimation method of AnimationManager and shouldn’t be used outside of that.

Inherited methods

Constructor details

ComponentAnimation

public ComponentAnimation()

Method details

compoundAnimation

public static ComponentAnimation compoundAnimation(ComponentAnimation... anims)
Allows us to create an animation that compounds several separate animations so they appear as a single animation to the system and process in parallel

Parameters

anims ComponentAnimation...
the animations

Returns

the compounded animation

sequentialAnimation

public static ComponentAnimation sequentialAnimation(ComponentAnimation... anims)
Allows us to create an animation that places several separate animations in a sequence so they appear as a single animation to the system and process one after the other

Parameters

anims ComponentAnimation...
the animations

Returns

the sequential animation

addOnCompleteCall

public void addOnCompleteCall(Runnable r)
Invokes the runnable just as the animation finishes thus allowing cleanup of the UI for the upcoming animations, this is useful when running a complex sequence

Parameters

r Runnable
the runnable to call when the animation is done

isStepModeSupported

public boolean isStepModeSupported()
Step mode allows stepping thru an animation one frame at a time, e.g. when scrolling down an animation might change title elements then change them back as we scroll up.

Returns

true if this animation can be stepped in which case the setStep etc. methods should work.

getStep

public int getStep()

setStep

public void setStep(int step)
Sets the current animation step to a value between 0 and maxSteps

Parameters

step int
the current step

getMaxSteps

public int getMaxSteps()
The total number of steps in this animation.

Returns

the number of steps

isInProgress

public abstract boolean isInProgress()
Indicates if the animation is in progress

Returns

true if in progress

updateState

protected abstract void updateState()
Updates the animation state

updateAnimationState

public final void updateAnimationState()
Invoked by the animation manager internally

completeAnimation

public final void completeAnimation()
Completes the animation if needed, without forcing an additional updateState() call.

flush

public void flush()
Flushes the animation immediately, this will be called if the form is de-initialized

setNotifyLock

public final void setNotifyLock(Object l)
This method is used internally by the addAnimationAndBlock method of AnimationManager and shouldn’t be used outside of that.

Parameters

l Object
the lock object

setOnCompletion

public final void setOnCompletion(Runnable r)
This method is used internally by the addAnimation method of AnimationManager and shouldn’t be used outside of that.

Parameters

r Runnable
the callback