vmm3d.core
Class IntegerParam
- java.lang.Object
-
- vmm3d.core.Parameter
-
- vmm3d.core.IntegerParam
-
public class IntegerParam extends Parameter
A parameter of type int. The value object for a paremeter of this type belongs to the class Integer.
-
-
Constructor Summary
Constructors Constructor and Description IntegerParam()Creates an IntegerParam that initially has no name and has value and default value equal to 0.IntegerParam(java.lang.String name, int initialValue)Create an IntegerParam with a specified name and initial value.IntegerParam(java.lang.String name, java.lang.String valueAsString)Create an IntegerParam with a specified name and initial value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetDefaultValue()Returns the default value of this parameter as an int.intgetMaximumValueForInput()Returns the maximum value that is allowed for this parameter when its value is input.intgetMinimumValueForInput()Returns the minimum value that is allowed for this parameter when its value is input.intgetValue()Get the value of this parameter in the form of an int.voidreset(int value)Sets both the default value and the value of this parameter to the specified integer.voidsetDefaultValue(int val)Sets the default value of the parameter to a specified int.voidsetMaximumValueForInput(int maximumValueForInput)Set the maximum value that is allowed for this parameter when its value is input.voidsetMinimumValueForInput(int minimumValueForInput)Set the minimum value that is allowed for this parameter when its value is input.voidsetValue(int val)Set the value of this parameter to a specified int.voidsetValueAndDefault(int val)Set both the value and the default value of this parameter to a specified int.-
Methods inherited from class vmm3d.core.Parameter
createParameterInput, getDefaultValueAsString, getDefaultValueObject, getHint, getName, getOwner, getTitle, getValueAsString, getValueObject, reset, setDefaultValueFromString, setDefaultValueObject, setName, setOwner, setValueAndDefaultFromString, setValueFromString, setValueObject, toString
-
-
-
-
Constructor Detail
-
IntegerParam
public IntegerParam()
Creates an IntegerParam that initially has no name and has value and default value equal to 0.
-
IntegerParam
public IntegerParam(java.lang.String name, int initialValue)Create an IntegerParam with a specified name and initial value.- 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. The name is for internal use in VMM. A human-readable name is returned byParameter.getTitle().initialValue- The initial value of the parameter. This also becomes its default value.
-
IntegerParam
public IntegerParam(java.lang.String name, java.lang.String valueAsString) throws java.lang.NumberFormatExceptionCreate an IntegerParam with a specified name and initial value.- Parameters:
name- The name of the Parameter.valueAsString- The initial value of the parameter, given as a constant expression that represents a legal value of type int. If this is not the case, a NumberFormatException is thrown. This also becomes its default value.- Throws:
java.lang.NumberFormatException
-
-
Method Detail
-
reset
public void reset(int value)
Sets both the default value and the value of this parameter to the specified integer. 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.The version in this class is essentially the same as
setValueAndDefault(int).- See Also:
Parameter.reset(String)
-
setValue
public void setValue(int val)
Set the value of this parameter to a specified int.- See Also:
Parameter.setValueObject(Object)
-
getValue
public int getValue()
Get the value of this parameter in the form of an int.- See Also:
Parameter.getValueObject()
-
setDefaultValue
public void setDefaultValue(int val)
Sets the default value of the parameter to a specified int. The default value is used when the user clicks the "Defaults" button in anAnimationLimitsDialog.- See Also:
Parameter.setDefaultValueObject(Object)
-
setValueAndDefault
public void setValueAndDefault(int val)
Set both the value and the default value of this parameter to a specified int.
-
getDefaultValue
public int getDefaultValue()
Returns the default value of this parameter as an int.- See Also:
Parameter.getDefaultValueObject()
-
getMaximumValueForInput
public int getMaximumValueForInput()
Returns the maximum value that is allowed for this parameter when its value is input. In the VMM core, this limit is only enforced when the value is input into aParameterInput.- See Also:
setMaximumValueForInput(int)
-
setMaximumValueForInput
public void setMaximumValueForInput(int maximumValueForInput)
Set the maximum value that is allowed for this parameter when its value is input. In the VMM core, this limit is only enforced when the value is input into aParameterInput. The default value is Integer.MAX_VALUE, which means that there is no limit.
-
getMinimumValueForInput
public int getMinimumValueForInput()
Returns the minimum value that is allowed for this parameter when its value is input. In the VMM core, this limit is only enforced when the value is input into aParameterInput.- See Also:
setMinimumValueForInput(int)
-
setMinimumValueForInput
public void setMinimumValueForInput(int minimumValueForInput)
Set the minimum value that is allowed for this parameter when its value is input. In the VMM core, this limit is only enforced when the value is input into aParameterInput. The default value is Integer.MIN_VALUE, which means that there is no limit.
-
-
DMelt 3.0 © DataMelt by jWork.ORG