Class KeyTimes


  • public class KeyTimes
    extends java.lang.Object
    Stores a list of times from 0 to 1 (the elapsed fraction of an animation cycle) that are used in calculating interpolated values for PropertySetter given a matching set of KeyValues and Interpolators for those time intervals. In the simplest case, a KeyFrame will consist of just two times in KeyTimes: 0 and 1.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.Float> times  
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyTimes​(float... times)
      Creates a new instance of KeyTimes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) int getInterval​(float fraction)
      Returns time interval that contains this time fraction
      (package private) int getSize()  
      (package private) float getTime​(int index)  
      (package private) java.util.ArrayList getTimes()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • times

        private java.util.ArrayList<java.lang.Float> times
    • Constructor Detail

      • KeyTimes

        public KeyTimes​(float... times)
        Creates a new instance of KeyTimes. Times should be in increasing order and should all be in the range [0,1], with the first value being zero and the last being 1
        Parameters:
        times - Time values
        Throws:
        java.lang.IllegalArgumentException - Time values must be ordered in increasing value, the first value must be 0 and the last value must be 1
    • Method Detail

      • getTimes

        java.util.ArrayList getTimes()
      • getSize

        int getSize()
      • getInterval

        int getInterval​(float fraction)
        Returns time interval that contains this time fraction
      • getTime

        float getTime​(int index)