Class AnimatableValue

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.text.DecimalFormat decimalFormat
      A formatting object to get CSS compatible float strings.
      protected boolean hasChanged
      Whether this value has changed since the last call to hasChanged().
      protected AnimationTarget target
      The target of the animation.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean canPace()
      Returns whether two values of this type can have their distance computed, as needed by paced animation.
      abstract float distanceTo​(AnimatableValue other)
      Returns the absolute distance between this value and the specified other value.
      static java.lang.String formatNumber​(float f)
      Returns a CSS compatible string version of the specified float.
      java.lang.String getCssText()
      Returns the CSS text representation of the value.
      abstract AnimatableValue getZeroValue()
      Returns a zero value of this AnimatableValue's type.
      boolean hasChanged()
      Returns whether the value in this AnimatableValue has been modified.
      abstract AnimatableValue interpolate​(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
      Performs interpolation to the given value.
      java.lang.String toString()
      Returns a string representation of this object prefixed with its class name.
      java.lang.String toStringRep()
      Returns a string representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AnimatableValue

        protected AnimatableValue​(AnimationTarget target)
        Creates a new AnimatableValue.
    • Method Detail

      • formatNumber

        public static java.lang.String formatNumber​(float f)
        Returns a CSS compatible string version of the specified float.
      • interpolate

        public abstract AnimatableValue interpolate​(AnimatableValue result,
                                                    AnimatableValue to,
                                                    float interpolation,
                                                    AnimatableValue accumulation,
                                                    int multiplier)
        Performs interpolation to the given value.
        Parameters:
        result - the object in which to store the result of the interpolation, or null if a new object should be created
        to - the value this value should be interpolated towards, or null if no actual interpolation should be performed
        interpolation - the interpolation distance, 0 <= interpolation <= 1
        accumulation - an accumulation to add to the interpolated value
        multiplier - an amount the accumulation values should be multiplied by before being added to the interpolated value
      • canPace

        public abstract boolean canPace()
        Returns whether two values of this type can have their distance computed, as needed by paced animation.
      • distanceTo

        public abstract float distanceTo​(AnimatableValue other)
        Returns the absolute distance between this value and the specified other value.
      • getZeroValue

        public abstract AnimatableValue getZeroValue()
        Returns a zero value of this AnimatableValue's type.
      • getCssText

        public java.lang.String getCssText()
        Returns the CSS text representation of the value.
      • hasChanged

        public boolean hasChanged()
        Returns whether the value in this AnimatableValue has been modified.
      • toStringRep

        public java.lang.String toStringRep()
        Returns a string representation of this object. This should be overridden in classes that do not have a CSS representation.
      • toString

        public java.lang.String toString()
        Returns a string representation of this object prefixed with its class name.
        Overrides:
        toString in class java.lang.Object