Class ComponentAnimation
- Direct Known Subclasses:
ComponentAnimation.UIMutation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA special kind of ComponentAnimation that encapsulates a mutation of the user interface. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes the runnable just as the animation finishes thus allowing cleanup of the UI for the upcoming animations, this is useful when running a complex sequencestatic ComponentAnimationcompoundAnimation(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 parallelvoidflush()Flushes the animation immediately, this will be called if the form is de-initializedintThe total number of steps in this animation.intgetStep()abstract booleanIndicates if the animation is in progressbooleanStep mode allows stepping thru an animation one frame at a time, e.g.static ComponentAnimationsequentialAnimation(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 otherfinal voidThis method is used internally by the addAnimationAndBlock method of AnimationManager and shouldn't be used outside of that.final voidThis method is used internally by the addAnimation method of AnimationManager and shouldn't be used outside of that.voidsetStep(int step) Sets the current animation step to a value between 0 and maxStepsfinal voidInvoked by the animation manager internallyprotected abstract voidUpdates the animation state
-
Constructor Details
-
ComponentAnimation
public ComponentAnimation()
-
-
Method Details
-
compoundAnimation
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: the animations
Returns
the compounded animation
-
sequentialAnimation
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: the animations
Returns
the sequential animation
-
addOnCompleteCall
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: 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: 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 -
flush
public void flush()Flushes the animation immediately, this will be called if the form is de-initialized -
setNotifyLock
This method is used internally by the addAnimationAndBlock method of AnimationManager and shouldn't be used outside of that.
Parameters
l: the lock object
-
setOnCompletion
This method is used internally by the addAnimation method of AnimationManager and shouldn't be used outside of that.
Parameters
r: the callback
-