Class AbstractAnimation

  • Direct Known Subclasses:
    InterpolatingAnimation, SetAnimation

    public abstract class AbstractAnimation
    extends java.lang.Object
    An abstract base class for the different types of animation.
    Version:
    $Id: AbstractAnimation.java 1733416 2016-03-03 07:07:13Z gadams $
    • Field Detail

      • timedElement

        protected TimedElement timedElement
        The TimedElement that controls the timing of this animation.
      • animatableElement

        protected AnimatableElement animatableElement
        The AnimatableElement that gives access to underlying values in the document.
      • lowerAnimation

        protected AbstractAnimation lowerAnimation
        The animation that is lower in the sandwich.
      • higherAnimation

        protected AbstractAnimation higherAnimation
        The animation that is higher in the sandwich.
      • isDirty

        protected boolean isDirty
        Whether this animation needs recomputing.
      • isActive

        protected boolean isActive
        Whether this animation is active.
      • isFrozen

        protected boolean isFrozen
        Whether this animation is frozen.
      • beginTime

        protected float beginTime
        The time at which this animation became active. Used for ensuring the sandwich order is correct when multiple animations become active simultaneously.
      • composedValue

        protected AnimatableValue composedValue
        The value of this animation composed with any others.
      • usesUnderlyingValue

        protected boolean usesUnderlyingValue
        Whether this animation depends on the underlying value.
      • toAnimation

        protected boolean toAnimation
        Whether this animation is a 'to-animation'.
    • Constructor Detail

    • Method Detail

      • getTimedElement

        public TimedElement getTimedElement()
        Returns the TimedElement for this animation.
      • getValue

        public AnimatableValue getValue()
        Returns the value of this animation, or null if it isn't active.
      • getComposedValue

        public AnimatableValue getComposedValue()
        Returns the composed value of this animation, or null if it isn't active.
      • toString

        public java.lang.String toString()
        Returns a string representation of this animation.
        Overrides:
        toString in class java.lang.Object
      • usesUnderlyingValue

        public boolean usesUnderlyingValue()
        Returns whether this animation depends on the underlying value.
      • willReplace

        protected boolean willReplace()
        Returns whether this animation will replace values on animations lower in the sandwich.
      • markDirty

        protected void markDirty()
        Marks this animation and any animation that depends on it as dirty.
      • sampledLastValue

        protected void sampledLastValue​(int repeatIteration)
        Called when the element is sampled for its "last" value.
      • sampledAt

        protected abstract void sampledAt​(float simpleTime,
                                          float simpleDur,
                                          int repeatIteration)
        Called when the element is sampled at the given time. This updates the value of the animation if active.