|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvmm.core.Parameter
vmm.core.RealParam
vmm.core.VariableParam
vmm.core.VariableParamAnimateable
public class VariableParamAnimateable
An animateable parameter that has a real value and a start and end value to be used for animation. Parameters of this type are mostly for use in user-defined objects. The name of a VariableParam is shared with the associated variable and therefor should probably be of human-readable form, such as "a" or "b".
| Constructor Summary | |
|---|---|
VariableParamAnimateable()
Creates a VariableParamAnimateable that initially has no name and has value and default value equal to 0, with animation limits also equal to zero. |
|
VariableParamAnimateable(java.lang.String name,
double value)
Create a VariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same value. |
|
VariableParamAnimateable(java.lang.String name,
double value,
double start,
double end)
Create a VariableParamAnimateable with a specified name, initial value and animation start and end values. |
|
VariableParamAnimateable(java.lang.String name,
java.lang.String valueAsString)
Create a VariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same value. |
|
VariableParamAnimateable(java.lang.String name,
java.lang.String valueAsString,
java.lang.String startString,
java.lang.String endString)
Create a VariableParamAnimateable with a specified name, initial value and animation start and end values. |
|
VariableParamAnimateable(Variable v)
Create a VariableParamAnimateable that will share the value of the specified variable. |
|
VariableParamAnimateable(Variable v,
double start,
double end)
Create a VariableParamAnimateable that will share the value of the specified variable. |
|
| Method Summary | |
|---|---|
double |
getAnimationEnd()
|
java.lang.String |
getAnimationEndAsString()
Returns a string representation of the end value for the animation. |
double |
getAnimationStart()
|
java.lang.String |
getAnimationStartAsString()
Returns a string representation of the start value for the animation. |
double |
getDefaultAnimationEnd()
|
java.lang.String |
getDefaultAnimationEndAsString()
Returns a string representation of the default end value for the animation. |
double |
getDefaultAnimationStart()
|
java.lang.String |
getDefaultAnimationStartAsString()
Returns a string representation of the default start value for the animation. |
boolean |
reallyAnimated()
Check whether this Animateable will really change during an animation. |
void |
reset(double value)
Sets both the default value and the value of this parameter to the specified number. |
void |
reset(double value,
double animationStart,
double animationEnd)
Sets both the value and default value of the parameter, as well as the value and default value of the animation start and end properties. |
void |
reset(java.lang.String valueAsString)
Set both the value and the default value of the parameter to the value encoded in the given string, as if that string had been passed to the constructor. |
void |
reset(java.lang.String valueAsString,
java.lang.String animationStartAsString,
java.lang.String animationEndAsString)
Sets both the value and default value of the parameter, as well as the value and default value of the animation start and end properties. |
void |
setAnimationEnd(double x)
|
void |
setAnimationEndFromString(java.lang.String endVal)
Set the ending Animation value for this Animateable object from a string. |
void |
setAnimationLimits(double start,
double end)
|
void |
setAnimationLimitsAndDefaults(double start,
double end)
|
void |
setAnimationStart(double x)
|
void |
setAnimationStartFromString(java.lang.String startVal)
Set the starting Animation value for this Animateable object from a string. |
void |
setDefaultAnimationEndFromString(java.lang.String endString)
Sets the default ending animation value for this Animateable object from a string representation of the value. |
void |
setDefaultAnimationLimits(double defaultStart,
double defaultEnd)
|
void |
setDefaultAnimationStartFromString(java.lang.String startString)
Sets the default start animation value for this Animateable object from a string representation of the value. |
void |
setFractionComplete(double fractionComplete)
Called during the course of a morphing animation so that the Animateable object can adjust itself to the current stage of the animation. |
| Methods inherited from class vmm.core.VariableParam |
|---|
getValueObject, getVariable, setName, setValueObject |
| Methods inherited from class vmm.core.RealParam |
|---|
getDefaultValue, getMaximumValueForInput, getMinimumValueForInput, getValue, setDefaultValue, setMaximumValueForInput, setMinimumValueForInput, setValue, setValueAndDefault, stringToValueObject, valueObjectToString |
| Methods inherited from class vmm.core.Parameter |
|---|
createParameterInput, getDefaultValueAsString, getDefaultValueObject, getHint, getName, getOwner, getTitle, getValueAsString, reset, setDefaultValueFromString, setDefaultValueObject, setOwner, setValueAndDefaultFromString, setValueFromString, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VariableParamAnimateable()
public VariableParamAnimateable(java.lang.String name,
double value)
name - The name of the Parameter, which can be null but ordinarily should not be.
The name shoud identify the Parameter uniquely among parameters associated with a given
Parameterizeable object.value - The initial value of the parameter. This also becomes its default value.public VariableParamAnimateable(Variable v)
v - the non-null variable that will be associated with the parameter
public VariableParamAnimateable(java.lang.String name,
java.lang.String valueAsString)
name - The name of the Parameter, which can be null but ordinarily should not be.
The name shoud identify the Parameter uniquely among parameters associated with a given
Parameterizeable object.valueAsString - The initial value of the parameter, given as a string. An error
of type NumberFormatException occurs if this string does not represent a legal value.
public VariableParamAnimateable(java.lang.String name,
java.lang.String valueAsString,
java.lang.String startString,
java.lang.String endString)
name - The name of the Parameter, which can be null but ordinarily should not be.
The name shoud identify the Parameter uniquely among parameters associated with a given
Parameterizeable object.
public VariableParamAnimateable(java.lang.String name,
double value,
double start,
double end)
name - The name of the Parameter, which can be null but ordinarily should not be.
The name shoud identify the Parameter uniquely among parameters associated with a given
Parameterizeable object.
public VariableParamAnimateable(Variable v,
double start,
double end)
v - the non-null variable that will be associated with the parameterstart - the animation start valueend - the animation end value| Method Detail |
|---|
public void reset(double value)
reset in class RealParamParameter.reset(String)
public void reset(double value,
double animationStart,
double animationEnd)
public void reset(java.lang.String valueAsString)
reset in class ParameterRealParam.stringToValueObject(String)
public void reset(java.lang.String valueAsString,
java.lang.String animationStartAsString,
java.lang.String animationEndAsString)
public double getDefaultAnimationStart()
public double getDefaultAnimationEnd()
public void setDefaultAnimationLimits(double defaultStart,
double defaultEnd)
public java.lang.String getDefaultAnimationStartAsString()
Animateable
getDefaultAnimationStartAsString in interface Animateablepublic java.lang.String getDefaultAnimationEndAsString()
Animateable
getDefaultAnimationEndAsString in interface Animateablepublic void setDefaultAnimationStartFromString(java.lang.String startString)
AnimateableAnimationLimitsDialog.
setDefaultAnimationStartFromString in interface AnimateablestartString - The default start value, as a string. This string will be parsed as a constant expression,
and a NumberFormatException will be thrown if the string is not a legal expression.public void setDefaultAnimationEndFromString(java.lang.String endString)
AnimateableAnimationLimitsDialog.
setDefaultAnimationEndFromString in interface AnimateableendString - The default end value, as a string. This string will be parsed as a constant expression,
and a NumberFormatException will be thrown if the string is not a legal expression.
public void setAnimationLimits(double start,
double end)
public void setAnimationLimitsAndDefaults(double start,
double end)
public void setAnimationStart(double x)
public void setAnimationEnd(double x)
public double getAnimationStart()
public double getAnimationEnd()
public void setAnimationStartFromString(java.lang.String startVal)
AnimateableAnimationLimitsDialog.
setAnimationStartFromString in interface AnimateablestartVal - The start value, as a string. This string will be parsed as a constant expression,
and a NumberFormatException will be thrown if the string is not a legal expression.public void setAnimationEndFromString(java.lang.String endVal)
Animateable
setAnimationEndFromString in interface AnimateableendVal - The end value, as a string. This string will be parsed as a constant expression,
and a NumberFormatException will be thrown if the string is not a legal expression.public java.lang.String getAnimationStartAsString()
Animateable
getAnimationStartAsString in interface Animateablepublic java.lang.String getAnimationEndAsString()
Animateable
getAnimationEndAsString in interface Animateablepublic void setFractionComplete(double fractionComplete)
AnimateablestartValue + fractionComplete * (endValue - startValue)"
when this metod is called.
setFractionComplete in interface AnimateablefractionComplete - A number in the range 0 to 1 that tells what
stage the animation is at. The Animateable object adjusts itself
accordingly.BasicAnimatorpublic boolean reallyAnimated()
Animateable
reallyAnimated in interface Animateable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||