Extras.Sync
Animation
Abstract
Class Hierarchy:
Direct Known Subclasses:
Extras.Sync.CalendarSelect.Animation

Abstract base class for timed animated effects. Animation developer provides initialization, step, and completion methods.

Instance Field Summary
Public stepIndex
The current animation step index.
Public startTime
The actual start time of the animation (milliseconds since the epoch, i.
Public endTime
The calculated end time of the animation (milliseconds since the epoch, i.
Internal _listenerList
Listener management object.
Internal _runnable
Runnable used to render animation over time.
Public, Virtual runTime
The runtime, in milliseconds of the animation.
Public, Virtual sleepInterval
Sleep interval, in milliseconds.

Instance Method Summary
Public, Abstract init()
Initializes the animation.
Public, Abstract complete()
Completes the animation.
Public, Abstract step()
Renders a step within the animation.
Internal _doStep()
Invoked by runnable to process a step of the animation.
Public abort()
Aborts an in-progress animation.
Public start()
Starts the animation.

Instance Method Detail
init
Initializes the animation. This method will always be invoked internally, it should not be manually invoked. This method will be invoked before the step() method. This method may never be invoked if the animation is immediately aborted or the allotted run time has expired.

complete
Completes the animation. This method will always be invoked internally, it should not be manually invoked. This method will always be invoked to finish the animation and/or clean up its resources, even if the animation was aborted. Implementations of this method should render the animation in its completed state.
Parameters:
abort (Boolean) - a flag indicating whether the animation aborted, true indicating it was aborted, false indicating it completed without abort

step
Renders a step within the animation. This method will always be invoked internally, it should not be manually invoked. The implementation should not attempt to check if the animation is finished, as this work should be done in the complete() method.
Parameters:
progress (Number) - a decimal value between 0 and 1 indicating the progress of the animation.

_doStep
Invoked by runnable to process a step of the animation.

abort
Aborts an in-progress animation. The complete() method will be invoked.

start
Starts the animation.
Parameters:
completeMethod (Function) - a function to execute when the animation has completed (it will be passed a boolean value of true or false to indicate whether animation was aborted (true) or not (false))