|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.animation.client.AnimationScheduler
public abstract class AnimationScheduler
This class provides task scheduling for animations. Any exceptions thrown by
the command objects executed by the scheduler will be passed to the
GWT.UncaughtExceptionHandler
if one is
installed.
Nested Class Summary | |
---|---|
static interface |
AnimationScheduler.AnimationCallback
The callback used when an animation frame becomes available. |
static class |
AnimationScheduler.AnimationHandle
A handle to the requested animation frame created by requestAnimationFrame(AnimationCallback, Element) . |
static class |
AnimationScheduler.AnimationSupportDetector
Helper to detect native support for animations. |
Constructor Summary | |
---|---|
AnimationScheduler()
|
Method Summary | |
---|---|
static AnimationScheduler |
get()
Returns the default implementation of the AnimationScheduler API. |
AnimationScheduler.AnimationHandle |
requestAnimationFrame(AnimationScheduler.AnimationCallback callback)
Schedule an animation, letting the browser decide when to trigger the next step in the animation. |
abstract AnimationScheduler.AnimationHandle |
requestAnimationFrame(AnimationScheduler.AnimationCallback callback,
Element element)
Schedule an animation, letting the browser decide when to trigger the next step in the animation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimationScheduler()
Method Detail |
---|
public static AnimationScheduler get()
public AnimationScheduler.AnimationHandle requestAnimationFrame(AnimationScheduler.AnimationCallback callback)
NOTE: If you are animating an element, use
requestAnimationFrame(AnimationCallback, Element)
instead so the
browser can optimize for the specified element.
Using this method instead of a timeout is preferred because the browser is in the best position to decide how frequently to trigger the callback for an animation of the specified element. The browser can balance multiple animations and trigger callbacks at the optimal rate for smooth performance.
callback
- the callback to fire
requestAnimationFrame(AnimationCallback, Element)
public abstract AnimationScheduler.AnimationHandle requestAnimationFrame(AnimationScheduler.AnimationCallback callback, Element element)
Using this method instead of a timeout is preferred because the browser is in the best position to decide how frequently to trigger the callback for an animation of the specified element. The browser can balance multiple animations and trigger callbacks at the optimal rate for smooth performance.
callback
- the callback to fireelement
- the element being animated
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |