Class ParameterShort
java.lang.Object
gov.nih.mipav.model.scripting.parameters.Parameter
gov.nih.mipav.model.scripting.parameters.ParameterShort
A singed short parameter used in either the recording or execution of a script action.
-
Field Summary
FieldsFields inherited from class gov.nih.mipav.model.scripting.parameters.Parameter
PARAM_BOOLEAN, PARAM_DOUBLE, PARAM_EXTERNAL_IMAGE, PARAM_FILE, PARAM_FLOAT, PARAM_IMAGE, PARAM_INT, PARAM_LIST, PARAM_LONG, PARAM_SHORT, PARAM_STRING, PARAM_USHORT -
Constructor Summary
ConstructorsConstructorDescriptionParameterShort(String paramLabel) Creates a new ParameterShort object without any value.ParameterShort(String paramLabel, int paramType, short paramValue) Creates a new ParameterShort object.ParameterShort(String paramLabel, int paramType, String paramValueString) Creates a new ParameterShort object.ParameterShort(String paramLabel, short paramValue) Creates a new ParameterShort with a new value.ParameterShort(String paramLabel, String paramTypeString, short paramValue) Creates a new ParameterShort object.ParameterShort(String paramLabel, String paramTypeString, String paramValueString) Creates a new ParameterShort object. -
Method Summary
Methods inherited from class gov.nih.mipav.model.scripting.parameters.Parameter
convertToString, getLabel, getParent, getParentConditionValueString, getType, getTypeFromString, getTypeString, getTypeString, isOptional, isParentConditionValueMet, isValueAssigned, setOptional, setParent, setParentCondition, setParentConditionValue, setValueAssigned
-
Field Details
-
value
private short valueThe parameter's value.
-
-
Constructor Details
-
ParameterShort
Creates a new ParameterShort object without any value.- Parameters:
paramLabel- The label/name to give to this parameter.- Throws:
ParserException- If there is a problem creating the parameter.
-
ParameterShort
Creates a new ParameterShort with a new value.- Parameters:
paramLabel- The label/name to give to this parameter.paramValue- The new parameter value.- Throws:
ParserException- If there is a problem creating the parameter.
-
ParameterShort
public ParameterShort(String paramLabel, String paramTypeString, short paramValue) throws ParserException Creates a new ParameterShort object.- Parameters:
paramLabel- The label/name to give to this parameter.paramTypeString- The type of this parameter, in string form.paramValue- The new parameter value.- Throws:
ParserException- If there is a problem creating the parameter.
-
ParameterShort
public ParameterShort(String paramLabel, String paramTypeString, String paramValueString) throws ParserException Creates a new ParameterShort object.- Parameters:
paramLabel- The label/name to give to this parameter.paramTypeString- The type of this parameter, in string form.paramValueString- The new parameter value in string form.- Throws:
ParserException- If there is a problem creating the parameter.
-
ParameterShort
Creates a new ParameterShort object.- Parameters:
paramLabel- The label/name to give to this parameter.paramType- The type of this parameter (should be PARAM_SHORT).paramValue- The new parameter value.- Throws:
ParserException- If there is a problem creating the parameter.
-
ParameterShort
public ParameterShort(String paramLabel, int paramType, String paramValueString) throws ParserException Creates a new ParameterShort object.- Parameters:
paramLabel- The label/name to give to this parameter.paramType- The type of this parameter (should be PARAM_SHORT).paramValueString- The new parameter value in string form.- Throws:
ParserException- If there is a problem creating the parameter.
-
-
Method Details
-
getValue
public short getValue()Returns the parameter value.- Returns:
- The parameter value.
-
getValueString
Returns the parameter value as a string.- Specified by:
getValueStringin classParameter- Returns:
- The parameter value in string form.
-
setValue
Changes the parameter's current value.- Specified by:
setValuein classParameter- Parameters:
paramValueString- The new parameter value in String form.- Throws:
ParserException- If there is a problem changing the parameter value.
-
setValue
Changes the parameter's current value.- Parameters:
paramValue- The new parameter value.- Throws:
ParserException- If there is a problem changing the parameter value.
-