Interface ILcdAnimation

All Known Implementing Classes:
ALcdAnimation, TLcdAnimation

public interface ILcdAnimation
An interface for an animation that can be played back using ALcdAnimationManager. Playback of an animation is performed by repeated calls to the setTime(double) method. The animation must specify its own duration (in seconds). The start() and stop() methods are invoked before and after the sequence of setTime calls, respectively.

It is recommended to extend from ALcdAnimation to implement custom animations, especially when the animation needs to invalidate one or more views.

Since:
2012.0
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the duration of this animation in seconds.
    boolean
    If true, ALcdAnimationManager will play this animation repeatedly until it is explicitly terminated.
    void
    Called by ALcdAnimationManager when this animation is looped and needs to start a new loop.
    void
    setTime(double aTime)
    Updates the animation in function of the time elapsed since its start.
    void
    Called by ALcdAnimationManager when this animation is added to the manager and needs to starts playing.
    void
    Called by ALcdAnimationManager when this animation is removed from the manager and needs to stops playing.
  • Method Details

    • getDuration

      double getDuration()
      Returns the duration of this animation in seconds.

      The duration of this animation should be a strictly positive finite value.

      Returns:
      the duration of this animation in seconds
    • start

      void start()
      Called by ALcdAnimationManager when this animation is added to the manager and needs to starts playing.
    • stop

      void stop()
      Called by ALcdAnimationManager when this animation is removed from the manager and needs to stops playing.
    • isLoop

      boolean isLoop()
      If true, ALcdAnimationManager will play this animation repeatedly until it is explicitly terminated. Each successive playback will be surrounded with a call to start() and stop().
      Returns:
      true if the animation should repeat, false if it should play once and then terminate
    • setTime

      void setTime(double aTime)
      Updates the animation in function of the time elapsed since its start.
      Parameters:
      aTime - the duration (in seconds) for which the animation has been running
    • restart

      void restart()
      Called by ALcdAnimationManager when this animation is looped and needs to start a new loop.