public static class ComponentAnimation.UIMutation

  1. Object
  2. ComponentAnimation
  3. ComponentAnimation.UIMutation
A special kind of ComponentAnimation that encapsulates a mutation of the user interface. This class used internally to allow compatible UI mutation animations to run concurrently. Two UI mutations are compatible if the containers that they mutate reside in separate branches of the UI tree. I.e. As long as neither container contains the other, their mutations are compatible.

Constructors

public UIMutation(Container cnt, ComponentAnimation anim)Creates a new UIMutation which mutates the given container with the provided animation.

Methods

public boolean add(Container cnt, ComponentAnimation anim)Tries to add another mutation to this UIMutation.
public boolean isLocked()Checks if this mutation is locked.
protected void updateState()Updates the animation state
public boolean isInProgress()Indicates if the animation is in progress
public void flush()Flushes the animation immediately, this will be called if the form is de-initialized
public int getMaxSteps()The total number of steps in this animation.
public void setStep(int step)Sets the current animation step to a value between 0 and maxSteps

Inherited nested types

Inherited methods

Constructor details

UIMutation

public UIMutation(Container cnt, ComponentAnimation anim)
Creates a new UIMutation which mutates the given container with the provided animation.

Parameters

cnt Container
The container that is being mutated.
anim ComponentAnimation
The animation.

Method details

add

public boolean add(Container cnt, ComponentAnimation anim)
Tries to add another mutation to this UIMutation.

Parameters

cnt Container
The container that is being mutated.
anim ComponentAnimation
The animation

Returns

True if it was successfully added. False otherwise. This will return false if #isLocked() returns true (i.e. the animation has already stared), or if the mutation is incompatible with any of the existing mutations in this mutation.

isLocked

public boolean isLocked()
Checks if this mutation is locked. Once a mutation animation has started, it becomes locked, and cannot have any further mutations added to it.

updateState

protected void updateState()
Updates the animation state

isInProgress

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

Returns

true if in progress

flush

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

getMaxSteps

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

Returns

the number of steps

setStep

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

Parameters

step int
the current step