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 of AnimationScheduler that does not execute the callbacks. Use getAnimationCallbacks() to retrieve and execute callbacks manually.
  • Constructor Details

    • StubAnimationScheduler

      public StubAnimationScheduler()
  • Method Details

    • getAnimationCallbacks

      public 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

      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 class AnimationScheduler
      Parameters:
      callback - the callback to fire
      element - the element being animated
      Returns:
      a handle to the requested animation frame