|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.animation.timing.interpolation.KeyValues<T>
public abstract class KeyValues<T>
Stores a list of values that correspond to the times in a KeyTimes object. These structures are then used to create a
KeyFrames object, which is then used to create a PropertyRange and ObjectModifier object, for the purposes
of modifying an object's property over time.
At each of the times in KeyTimes, the property will take
on the corresponding value in the KeyValues object. Between these
times, the property will take on a value based on the interpolation
information stored in the KeyFrames object.
| Field Summary | |
|---|---|
protected java.lang.Object |
startValue
|
protected java.util.ArrayList<T> |
values
|
| Constructor Summary | |
|---|---|
protected |
KeyValues()
Callers should create KeyValues structures from the factory methods which create KeyValues subclasses based on the types of values. |
protected |
KeyValues(double[] values)
|
protected |
KeyValues(float[] values)
|
protected |
KeyValues(int[] values)
|
protected |
KeyValues(java.lang.Object[] values)
Subclasses call this constructor to account for "to" animations; this method inserts a "null" value as the first element |
| Method Summary | |
|---|---|
static KeyValues |
createKeyValues(java.awt.Color... values)
Create KeyValues object with Color values |
static KeyValues |
createKeyValues(java.awt.Dimension... values)
Create KeyValues object with Dimension values |
static KeyValues |
createKeyValues(double... values)
Create KeyValues object with double values |
static KeyValues |
createKeyValues(float... values)
Create KeyValues object with float values |
static KeyValues |
createKeyValues(int... values)
Create KeyValues object with int values |
static KeyValues |
createKeyValues(java.awt.Point... values)
Create KeyValues object with Point values |
static KeyValues |
createKeyValues(java.awt.Rectangle... values)
Create KeyValues object with Rectangle values |
int |
getSize()
Returns the number of values stored in this object |
abstract java.lang.Class<?> |
getType()
Subclasses will override this to return the type associated with that subclass. |
void |
setStartValue(java.lang.Object startValue)
Called at start of animation; sets starting value in simple "to" animations |
abstract void |
setValue(java.lang.Object object,
java.lang.reflect.Method method,
int index)
Sets the value of the property to be the value at index. |
abstract void |
setValue(java.lang.Object object,
java.lang.reflect.Method method,
int i0,
int i1,
float fraction)
Sets the value of the property with a linear interpolation of the given fraction between the values at i0 and i1. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ArrayList<T> values
protected java.lang.Object startValue
| Constructor Detail |
|---|
protected KeyValues()
protected KeyValues(java.lang.Object[] values)
protected KeyValues(float[] values)
protected KeyValues(int[] values)
protected KeyValues(double[] values)
| Method Detail |
|---|
public int getSize()
public static KeyValues createKeyValues(int... values)
public static KeyValues createKeyValues(float... values)
public static KeyValues createKeyValues(double... values)
public static KeyValues createKeyValues(java.awt.Point... values)
public static KeyValues createKeyValues(java.awt.Dimension... values)
public static KeyValues createKeyValues(java.awt.Rectangle... values)
public static KeyValues createKeyValues(java.awt.Color... values)
public abstract java.lang.Class<?> getType()
public void setStartValue(java.lang.Object startValue)
public abstract void setValue(java.lang.Object object,
java.lang.reflect.Method method,
int i0,
int i1,
float fraction)
public abstract void setValue(java.lang.Object object,
java.lang.reflect.Method method,
int index)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||