|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvmm.core.Parameter
vmm.core.IntegerParam
public class IntegerParam
A parameter of type int. The value object for a paremeter of this type belongs to the class Integer.
| Constructor Summary | |
|---|---|
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 | |
|---|---|
int |
getDefaultValue()
Returns the default value of this parameter as an int. |
int |
getMaximumValueForInput()
Returns the maximum value that is allowed for this parameter when its value is input. |
int |
getMinimumValueForInput()
Returns the minimum value that is allowed for this parameter when its value is input. |
int |
getValue()
Get the value of this parameter in the form of an int. |
void |
reset(int value)
Sets both the default value and the value of this parameter to the specified integer. |
void |
setDefaultValue(int val)
Sets the default value of the parameter to a specified int. |
void |
setMaximumValueForInput(int maximumValueForInput)
Set the maximum value that is allowed for this parameter when its value is input. |
void |
setMinimumValueForInput(int minimumValueForInput)
Set the minimum value that is allowed for this parameter when its value is input. |
void |
setValue(int val)
Set the value of this parameter to a specified int. |
void |
setValueAndDefault(int val)
Set both the value and the default value of this parameter to a specified int. |
protected java.lang.Object |
stringToValueObject(java.lang.String str)
Converts a string to an object of type Integer. |
| Methods inherited from class vmm.core.Parameter |
|---|
createParameterInput, getDefaultValueAsString, getDefaultValueObject, getHint, getName, getOwner, getTitle, getValueAsString, getValueObject, reset, reset, setDefaultValueFromString, setDefaultValueObject, setName, setOwner, setValueAndDefaultFromString, setValueFromString, setValueObject, toString, valueObjectToString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntegerParam()
public IntegerParam(java.lang.String name,
int initialValue)
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 by Parameter.getTitle().initialValue - The initial value of the parameter. This also becomes its default value.
public IntegerParam(java.lang.String name,
java.lang.String valueAsString)
throws java.lang.NumberFormatException
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.
java.lang.NumberFormatException| Method Detail |
|---|
public void reset(int value)
The version in this class is essentially the same as setValueAndDefault(int).
Parameter.reset(String)public void setValue(int val)
Parameter.setValueObject(Object)public int getValue()
Parameter.getValueObject()public void setDefaultValue(int val)
AnimationLimitsDialog.
Parameter.setDefaultValueObject(Object)public void setValueAndDefault(int val)
public int getDefaultValue()
Parameter.getDefaultValueObject()public int getMaximumValueForInput()
ParameterInput.
setMaximumValueForInput(int)public void setMaximumValueForInput(int maximumValueForInput)
ParameterInput. The default value
is Integer.MAX_VALUE, which means that there is no limit.
public int getMinimumValueForInput()
ParameterInput.
setMinimumValueForInput(int)public void setMinimumValueForInput(int minimumValueForInput)
ParameterInput. The default value
is Integer.MIN_VALUE, which means that there is no limit.
protected java.lang.Object stringToValueObject(java.lang.String str)
throws java.lang.NumberFormatException
stringToValueObject in class Parameterstr - A string representation of a value for the parameter, possibly as a constant expression such as "2*pi"
java.lang.NumberFormatException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||