Class ComponentAnimation.UIMutation
- Enclosing class:
ComponentAnimation
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.
Since
7.0
See also
-
AnimationManager#addUIMutation(com.codename1.ui.Container, com.codename1.ui.animations.ComponentAnimation)
-
AnimationManager#addUIMutation(com.codename1.ui.Container, com.codename1.ui.animations.ComponentAnimation, java.lang.Runnable)
-
Nested Class Summary
Nested classes/interfaces inherited from class ComponentAnimation
ComponentAnimation.UIMutation -
Constructor Summary
ConstructorsConstructorDescriptionUIMutation(Container cnt, ComponentAnimation anim) Creates a new UIMutation which mutates the given container with the provided animation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(Container cnt, ComponentAnimation anim) Tries to add another mutation to this UIMutation.voidflush()Flushes the animation immediately, this will be called if the form is de-initializedintThe total number of steps in this animation.booleanIndicates if the animation is in progressbooleanisLocked()Checks if this mutation is locked.voidsetStep(int step) Sets the current animation step to a value between 0 and maxStepsprotected voidUpdates the animation stateMethods inherited from class ComponentAnimation
addOnCompleteCall, compoundAnimation, getStep, isStepModeSupported, sequentialAnimation, setNotifyLock, setOnCompletion, updateAnimationState
-
Constructor Details
-
UIMutation
Creates a new UIMutation which mutates the given container with the provided animation.
Parameters
-
cnt: The container that is being mutated. -
anim: The animation.
-
-
-
Method Details
-
add
Tries to add another mutation to this UIMutation.
Parameters
-
cnt: The container that is being mutated. -
anim: The animation
Returns
- 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()Description copied from class:ComponentAnimationUpdates the animation state -
isInProgress
public boolean isInProgress()Description copied from class:ComponentAnimationIndicates if the animation is in progress
Returns
true if in progress
- Specified by:
isInProgressin classComponentAnimation
-
flush
public void flush()Description copied from class:ComponentAnimationFlushes the animation immediately, this will be called if the form is de-initialized- Overrides:
flushin classComponentAnimation
-
getMaxSteps
public int getMaxSteps()Description copied from class:ComponentAnimationThe total number of steps in this animation.
Returns
the number of steps
- Overrides:
getMaxStepsin classComponentAnimation
-
setStep
public void setStep(int step) Description copied from class:ComponentAnimationSets the current animation step to a value between 0 and maxSteps
Parameters
step: the current step
- Overrides:
setStepin classComponentAnimation
-