Class StubAnimationScheduler
- java.lang.Object
-
- com.google.gwt.animation.client.AnimationScheduler
-
- com.google.gwt.animation.client.testing.StubAnimationScheduler
-
public class StubAnimationScheduler extends AnimationScheduler
A stub implementation ofAnimationScheduler
that does not execute the callbacks. UsegetAnimationCallbacks()
to retrieve and execute callbacks manually.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
StubAnimationScheduler.StubAnimationHandle
A handle to the requested animation frame created byAnimationScheduler.requestAnimationFrame(AnimationCallback, Element)
.-
Nested classes/interfaces inherited from class com.google.gwt.animation.client.AnimationScheduler
AnimationScheduler.AnimationCallback, AnimationScheduler.AnimationHandle, AnimationScheduler.AnimationSupportDetector
-
-
Constructor Summary
Constructors Constructor Description StubAnimationScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AnimationScheduler.AnimationCallback>
getAnimationCallbacks()
Get the list of all animation callbacks that have been requested and have not been canceled.StubAnimationScheduler.StubAnimationHandle
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 com.google.gwt.animation.client.AnimationScheduler
get, requestAnimationFrame
-
-
-
-
Method Detail
-
getAnimationCallbacks
public java.util.List<AnimationScheduler.AnimationCallback> getAnimationCallbacks()
Get the list of all animation callbacks that have been requested and have not been canceled.- Returns:
- the list of callbacks.
-
requestAnimationFrame
public StubAnimationScheduler.StubAnimationHandle requestAnimationFrame(AnimationScheduler.AnimationCallback callback, Element element)
Description copied from class:AnimationScheduler
Schedule an animation, letting the browser decide when to trigger the next step in the animation.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.
- Specified by:
requestAnimationFrame
in classAnimationScheduler
- Parameters:
callback
- the callback to fireelement
- the element being animated- Returns:
- a handle to the requested animation frame
-
-