Class ViewportAnimation<T extends Component>

java.lang.Object
com.spinyowl.legui.animation.Animation
com.spinyowl.legui.component.misc.animation.ViewportAnimation<T>
Direct Known Subclasses:
ScrollablePanelAnimation, TextAreaScrollAnimation

public abstract class ViewportAnimation<T extends Component> extends Animation
  • Constructor Details

    • ViewportAnimation

      public ViewportAnimation(T component, double updateTime)
  • Method Details

    • getComponentReference

      public WeakReference<T> getComponentReference()
    • animate

      protected 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.

      Specified by:
      animate in class Animation
      Parameters:
      delta - delta time (from previous call).
      Returns:
      true if animation is finished and could be removed from animator.
    • updateViewport

      protected abstract void updateViewport(T component, double delta)
    • updateViewport

      protected void updateViewport(Component viewport, Component container, ScrollBar verticalScrollBar, ScrollBar horizontalScrollBar, double delta)