- java.lang.Object
- 
- javafx.animation.KeyValue
 
- 
 public final class KeyValue extends Object Defines a key value to be interpolated for a particular interval along the animation. AKeyFrame, which defines a specific point on a timeline, can hold multipleKeyValues.KeyValueis an immutable class.A KeyValueis defined by a target, which is an implementation ofWritableValue, an end value and anInterpolator.Most interpolators define the interpolation between two KeyFrames. (The only exception are tangent-interpolators.) TheKeyValueof the secondKeyFrame(in forward direction) specifies the interpolator to be used in the interval.Tangent-interpolators define the interpolation to the left and to the right of a KeyFrame(seeInterpolator.TANGENT).By default, Interpolator.LINEARis used in the interval.- Since:
- JavaFX 2.0
- See Also:
- Timeline,- KeyFrame,- Interpolator
 
- 
- 
Constructor SummaryConstructors Constructor Description KeyValue(WritableValue<T> target, T endValue)Creates aKeyValuethat usesInterpolator.LINEAR.KeyValue(WritableValue<T> target, T endValue, Interpolator interpolator)Creates aKeyValue.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Indicates whether some other object is "equal to" this one.ObjectgetEndValue()Returns the end value of thisKeyValueInterpolatorgetInterpolator()Interpolatorto be used for calculating the key value along the particular interval.WritableValue<?>getTarget()Returns the target of thisKeyValueinthashCode()Returns a hash code for thisKeyValueobject.StringtoString()Returns a string representation of thisKeyValueobject.
 
- 
- 
- 
Constructor Detail- 
KeyValuepublic KeyValue(WritableValue<T> target, T endValue, Interpolator interpolator) Creates aKeyValue.- Type Parameters:
- T- the type of the- KeyValue
- Parameters:
- target- the target
- endValue- the end value
- interpolator- the- Interpolator
- Throws:
- NullPointerException- if- targetor- interpolatorare- null
 
 - 
KeyValuepublic KeyValue(WritableValue<T> target, T endValue) Creates aKeyValuethat usesInterpolator.LINEAR.- Type Parameters:
- T- the type of the- KeyValue
- Parameters:
- target- the target
- endValue- the end value
- Throws:
- NullPointerException- if- targetor- interpolatorare- null
 
 
- 
 - 
Method Detail- 
getTargetpublic WritableValue<?> getTarget() Returns the target of thisKeyValue- Returns:
- the target
 
 - 
getEndValuepublic Object getEndValue() Returns the end value of thisKeyValue- Returns:
- the end value
 
 - 
getInterpolatorpublic Interpolator getInterpolator() Interpolatorto be used for calculating the key value along the particular interval. By default,Interpolator.LINEARis used.- Returns:
- the interpolator to be used for calculating the key value along the particular interval
 
 - 
toStringpublic String toString() Returns a string representation of thisKeyValueobject.
 - 
hashCodepublic int hashCode() Returns a hash code for thisKeyValueobject.
 
- 
 
-