Class AbstractAnimator

    • Constructor Detail

      • AbstractAnimator

        public AbstractAnimator​(long duration)
        Create new animator with the given duration. The animation will start with the first call to setTime(long).
        Parameters:
        duration - animation duration (in time units)
    • Method Detail

      • setTime

        public void setTime​(long time)
        Sets the current time for the animation. The first call starts the animation.
        Parameters:
        time - current time (in time units)
      • isComplete

        public boolean isComplete()
        Returns true if the animation is completed at the current time.
        Returns:
        true if the animation completed.
      • ratioComplete

        public double ratioComplete()
        Returns the completion ratio. It is a double ranging from 0 to 1, 0 indicating that the animation just started, 1 indicating that it completed.
        Returns:
        the completion ratio.