vmm3d.core
Class ComplexVariableParamAnimateable
- java.lang.Object
-
- vmm3d.core.Parameter
-
- vmm3d.core.ComplexParam
-
- vmm3d.core.ComplexVariableParam
-
- vmm3d.core.ComplexVariableParamAnimateable
-
- All Implemented Interfaces:
- Animateable
public class ComplexVariableParamAnimateable extends ComplexVariableParam implements Animateable
A parameter that has an associated ComplexVariable that shares its value. The parameter hasvalue and a start and end value, all of type Complex, to be used for animation.
-
-
Constructor Summary
Constructors Constructor and Description ComplexVariableParamAnimateable()Creates a ComplexVariableParamAnimateable that initially has no name and has value and default value equal to 0, with animation limits also equal to 0.ComplexVariableParamAnimateable(java.lang.String name, Complex value)Create a ComplexVariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same valueComplexVariableParamAnimateable(java.lang.String name, Complex value, Complex start, Complex end)Create a ComplexVariableParamAnimateable with a specified name, initial value, and start and end values.ComplexVariableParamAnimateable(java.lang.String name, java.lang.String valueAsString)Create a ComplexVariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same value.ComplexVariableParamAnimateable(java.lang.String name, java.lang.String valueAsString, java.lang.String startString, java.lang.String endString)Create a ComplexVariableParamAnimateable with a specified name, initial value, and start and end values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ComplexgetAnimationEnd()java.lang.StringgetAnimationEndAsString()Returns a string representation of the end value for the animation.ComplexgetAnimationStart()java.lang.StringgetAnimationStartAsString()Returns a string representation of the start value for the animation.ComplexgetDefaultAnimationEnd()java.lang.StringgetDefaultAnimationEndAsString()Returns a string representation of the default end value for the animation.ComplexgetDefaultAnimationStart()java.lang.StringgetDefaultAnimationStartAsString()Returns a string representation of the default start value for the animation.booleanreallyAnimated()Check whether this Animateable will really change during an animation.voidreset(Complex value)Sets both the default value and the value of this parameter to the specified complex number.voidreset(Complex value, Complex animationStart, Complex 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.voidreset(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.voidreset(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.voidsetAnimationEnd(Complex x)voidsetAnimationEndFromString(java.lang.String endVal)Set the ending Animation value for this Animateable object from a string.voidsetAnimationLimits(Complex start, Complex end)voidsetAnimationLimitsAndDefaults(Complex start, Complex end)voidsetAnimationStart(Complex x)voidsetAnimationStartFromString(java.lang.String startVal)Set the starting Animation value for this Animateable object from a string.voidsetDefaultAnimationEndFromString(java.lang.String endString)Sets the default ending animation value for this Animateable object from a string representation of the value.voidsetDefaultAnimationLimits(Complex defaultStart, Complex defaultEnd)voidsetDefaultAnimationStartFromString(java.lang.String startString)Sets the default start animation value for this Animateable object from a string representation of the value.voidsetFractionComplete(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 vmm3d.core.ComplexVariableParam
getValueObject, getVariable, setName, setValueObject
-
Methods inherited from class vmm3d.core.ComplexParam
getDefaultValue, getMaximumValueForInput, getMinimumValueForInput, getValue, setDefaultValue, setMaximumValueForInput, setMinimumValueForInput, setValue, setValueAndDefault
-
Methods inherited from class vmm3d.core.Parameter
createParameterInput, getDefaultValueAsString, getDefaultValueObject, getHint, getName, getOwner, getTitle, getValueAsString, setDefaultValueFromString, setDefaultValueObject, setOwner, setValueAndDefaultFromString, setValueFromString, toString
-
-
-
-
Constructor Detail
-
ComplexVariableParamAnimateable
public ComplexVariableParamAnimateable()
Creates a ComplexVariableParamAnimateable that initially has no name and has value and default value equal to 0, with animation limits also equal to 0.
-
ComplexVariableParamAnimateable
public ComplexVariableParamAnimateable(java.lang.String name, Complex value)Create a ComplexVariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same value- Parameters:
name- The name of the Parameter, which can be null but ordinarily should not be. This name is also used for the associated ComplexVariable.value- The initial value of the parameter. This also becomes its default value. A null value is treated as zero.
-
ComplexVariableParamAnimateable
public ComplexVariableParamAnimateable(java.lang.String name, Complex value, Complex start, Complex end)Create a ComplexVariableParamAnimateable with a specified name, initial value, and start and end values.- Parameters:
name- The name of the Parameter, which can be null but ordinarily should not be. The name is also used for the associated variable.value- The initial value of the parameter. This also becomes its default value. A null value is treated as zero.start- the animation start value for this parameter. A null value is treated as zero.end- the animation end value for this parameter. A null value is treated as zero.
-
ComplexVariableParamAnimateable
public ComplexVariableParamAnimateable(java.lang.String name, java.lang.String valueAsString)Create a ComplexVariableParamAnimateable with a specified name and initial value and with animation start and end values equal to the same value.- Parameters:
name- The name of the Parameter, which can be null but ordinarily should not be. The name is also used for the associated variable.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.
-
ComplexVariableParamAnimateable
public ComplexVariableParamAnimateable(java.lang.String name, java.lang.String valueAsString, java.lang.String startString, java.lang.String endString)Create a ComplexVariableParamAnimateable with a specified name, initial value, and start and end values. The values are specified as strings.- Parameters:
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.startString- the animation start value given as a string. A NumberFormatError can occur, if this is not a legal value.endString- the animation end value given as a string. A NumberFormatError can occur, if this is not a legal value.
-
-
Method Detail
-
reset
public void reset(Complex value)
Sets both the default value and the value of this parameter to the specified complex number. In addition the values and default values for the animation start and end properities are also set to the same value. This is primarily meant to be called in the constructor of an Exhibit when it wants to change the value of a parameter that is inherited from a superclass.- Overrides:
resetin classComplexParam- Parameters:
value- the new value and default value. A null value is treated as zero.- See Also:
Parameter.reset(String)
-
reset
public void reset(Complex value, Complex animationStart, Complex 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.
-
reset
public 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. In addition the values and default values for the animation start and end properities are also set to the same value. This is primarily meant to be called in the constructor of an Exhibit when it wants to change the value of a parameter that is inherited from a superclass.- Overrides:
resetin classParameter- See Also:
ComplexParam.stringToValueObject(String)
-
reset
public 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.
-
getDefaultAnimationStart
public Complex getDefaultAnimationStart()
-
getDefaultAnimationEnd
public Complex getDefaultAnimationEnd()
-
setDefaultAnimationLimits
public void setDefaultAnimationLimits(Complex defaultStart, Complex defaultEnd)
-
getDefaultAnimationStartAsString
public java.lang.String getDefaultAnimationStartAsString()
Description copied from interface:AnimateableReturns a string representation of the default start value for the animation.- Specified by:
getDefaultAnimationStartAsStringin interfaceAnimateable
-
getDefaultAnimationEndAsString
public java.lang.String getDefaultAnimationEndAsString()
Description copied from interface:AnimateableReturns a string representation of the default end value for the animation.- Specified by:
getDefaultAnimationEndAsStringin interfaceAnimateable
-
setDefaultAnimationStartFromString
public void setDefaultAnimationStartFromString(java.lang.String startString)
Description copied from interface:AnimateableSets the default start animation value for this Animateable object from a string representation of the value. The default values are used, for example, when the user clicks the "Defaults" button inAnimationLimitsDialog.- Specified by:
setDefaultAnimationStartFromStringin interfaceAnimateable- Parameters:
startString- 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.
-
setDefaultAnimationEndFromString
public void setDefaultAnimationEndFromString(java.lang.String endString)
Description copied from interface:AnimateableSets the default ending animation value for this Animateable object from a string representation of the value. The default values are used, for example, when the user clicks the "Defaults" button inAnimationLimitsDialog.- Specified by:
setDefaultAnimationEndFromStringin interfaceAnimateable- Parameters:
endString- 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.
-
setAnimationStart
public void setAnimationStart(Complex x)
-
setAnimationEnd
public void setAnimationEnd(Complex x)
-
getAnimationStart
public Complex getAnimationStart()
-
getAnimationEnd
public Complex getAnimationEnd()
-
setAnimationStartFromString
public void setAnimationStartFromString(java.lang.String startVal)
Description copied from interface:AnimateableSet the starting Animation value for this Animateable object from a string. This method will probably only be used by Dialog boxes such asAnimationLimitsDialog.- Specified by:
setAnimationStartFromStringin interfaceAnimateable- Parameters:
startVal- 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.
-
setAnimationEndFromString
public void setAnimationEndFromString(java.lang.String endVal)
Description copied from interface:AnimateableSet the ending Animation value for this Animateable object from a string.- Specified by:
setAnimationEndFromStringin interfaceAnimateable- Parameters:
endVal- 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.
-
getAnimationStartAsString
public java.lang.String getAnimationStartAsString()
Description copied from interface:AnimateableReturns a string representation of the start value for the animation.- Specified by:
getAnimationStartAsStringin interfaceAnimateable
-
getAnimationEndAsString
public java.lang.String getAnimationEndAsString()
Description copied from interface:AnimateableReturns a string representation of the end value for the animation.- Specified by:
getAnimationEndAsStringin interfaceAnimateable
-
setFractionComplete
public void setFractionComplete(double fractionComplete)
Description copied from interface:AnimateableCalled during the course of a morphing animation so that the Animateable object can adjust itself to the current stage of the animation. In fact, an Animateable Parameter could set its value to "startValue + fractionComplete * (endValue - startValue)" when this metod is called.- Specified by:
setFractionCompletein interfaceAnimateable- Parameters:
fractionComplete- A number in the range 0 to 1 that tells what stage the animation is at. The Animateable object adjusts itself accordingly.- See Also:
BasicAnimator
-
reallyAnimated
public boolean reallyAnimated()
Description copied from interface:AnimateableCheck whether this Animateable will really change during an animation. (If the start and end values are the same, then the return value will presumably be false.)- Specified by:
reallyAnimatedin interfaceAnimateable
-
-
DMelt 3.0 © DataMelt by jWork.ORG