T - Value typepublic class KeyFrames<T>
extends java.lang.Object
| Constructor | Description |
|---|---|
KeyFrames(KeyValues<T> keyValues) |
Simplest variation; determine keyTimes based on even division of 0-1
range based on number of keyValues.
|
KeyFrames(KeyValues<T> keyValues,
TimelineEase... interpolators) |
Utility constructor that assumes even division of times according to size
of keyValues and interpolation according to interpolators parameter.
|
KeyFrames(KeyValues<T> keyValues,
KeyTimes keyTimes) |
This variant takes both keyValues (values at each point in time) and
keyTimes (times at which values are sampled).
|
KeyFrames(KeyValues<T> keyValues,
KeyTimes keyTimes,
TimelineEase... interpolators) |
Full constructor: caller provides an instance of all key* structures
which will be used to calculate between all times in the keyTimes list.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getInterval(float fraction) |
Returns time interval that contains the specified time fraction
|
java.lang.Class |
getType() |
|
T |
getValue(float fraction) |
Returns a value for the given fraction elapsed of the animation cycle.
|
public KeyFrames(KeyValues<T> keyValues)
keyValues - values that will be assumed at each time in keyTimespublic KeyFrames(KeyValues<T> keyValues, KeyTimes keyTimes)
keyValues - values that the animation will assume at each of the
corresponding times in keyTimeskeyTimes - times at which the animation will assume the corresponding
values in keyValuesjava.lang.IllegalArgumentException - keyTimes and keySizes must have the same number of elements
since these structures are meant to have corresponding
entries; an exception is thrown otherwise.public KeyFrames(KeyValues<T> keyValues, KeyTimes keyTimes, TimelineEase... interpolators)
KeyFrames(KeyValues, KeyTimes).keyValues - values that the animation will assume at each of the
corresponding times in keyTimeskeyTimes - times at which the animation will assume the corresponding
values in keyValuesinterpolators - collection of Interpolators that control the calculation of
values in each of the intervals defined by keyFrames. If this
value is null, a Linear will be used for
all intervals. If there is only one interpolator, that
interpolator will be used for all intervals. Otherwise, there
must be a number of interpolators equal to the number of
intervals (which is one less than the number of keyTimes).java.lang.IllegalArgumentException - keyTimes and keyValues must have the same number of elements
since these structures are meant to have corresponding
entries; an exception is thrown otherwise.java.lang.IllegalArgumentException - The number of interpolators must either be zero
(interpolators == null), one, or one less than the size of
keyTimes.public KeyFrames(KeyValues<T> keyValues, TimelineEase... interpolators)
keyValues - values that the animation will assume at each of the
corresponding times in keyTimesinterpolators - collection of Interpolators that control the calculation of
values in each of the intervals defined by keyFrames. If this
value is null, a Linear will be used for
all intervals. If there is only one interpolator, that
interpolator will be used for all intervals. Otherwise, there
must be a number of interpolators equal to the number of
intervals (which is one less than the number of keyTimes).java.lang.IllegalArgumentException - The number of interpolators must either be zero
(interpolators == null), one, or one less than the size of
keyTimes.public java.lang.Class getType()
public int getInterval(float fraction)
fraction - Time fractionpublic T getValue(float fraction)
fraction - Fraction