Class Animation

java.lang.Object
com.spinyowl.legui.animation.Animation
Direct Known Subclasses:
ScrollBarAnimation, SelectBoxAnimation, ViewportAnimation

public abstract class Animation extends Object
Draft animation realization.
  • Constructor Details

    • Animation

      public Animation()
  • Method Details

    • startAnimation

      public void startAnimation()
      Adds animation to animator.
    • beforeAnimation

      protected void beforeAnimation()
      Called one time before animate loop.
    • animate

      protected abstract boolean animate(double delta)
      This method used to update animated object. Called by animator every frame. Removed from animator and stops when this method returns true.

      Returns true if animation is finished and could be removed from animator.

      Parameters:
      delta - delta time (from previous call).
      Returns:
      true if animation is finished and could be removed from animator.
    • afterAnimation

      protected void afterAnimation()
      Called one time when animation ended.
    • stopAnimation

      public void stopAnimation()
      Used to stop animation. Removes animation from animator.
    • isAnimationStarted

      public boolean isAnimationStarted()
      Returns the flag that indicates if animation was started.
      Returns:
      the flag that indicates if animation was started.