Class Parameter
Parameter
is a named item which has a value of type Object
.
Every parameter has an associated ParamProperties
reference assigned to it which stores the
properties such as type, value range and more. A single ParamProperties
instance can be shared over
multiple Parameter
instances.
Parameters also have an ParamEditor
to let a user modify the value in a GUI and a
ParamValidator
to parse, format and validate it.
- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParamChangeListener
(ParamChangeListener listener) Deprecated.Adds a parameter change listener to this parameter.protected ParamEditor
Deprecated.protected ParamValidator
Deprecated.boolean
equalsValue
(Object value) Deprecated.protected void
fireParamValueChanged
(Parameter parameter, Object oldValue) Deprecated.formatValue
(Object value) Deprecated.Deprecated.getName()
Deprecated.Returns the name of this parameterDeprecated.Returns additional parameter information.getType()
Deprecated.Returns the value type of this parameterDeprecated.getValue()
Deprecated.Returns the current value of this parameter.Deprecated.Returns the value of this parameter as string or an empty string.Deprecated.Returns the value type of this parameter.boolean
isLegalValue
(Object value) Deprecated.Tests if the given value is a legal value for this parameter.boolean
Deprecated.Tests if this parameter's value type is a, is derived from or implements the given value type.boolean
Deprecated.parseValue
(String text) Deprecated.void
removeParamChangeListener
(ParamChangeListener listener) Deprecated.Removes the parameter change listener from this parameter.void
Deprecated.Sets the value of this parameter to the default value specified in this parameter's attributes.void
setProperties
(ParamProperties properties) Deprecated.Sets the additional parameter information.void
setPropertyValues
(PropertyMap propertyMap) Deprecated.void
setUIEnabled
(boolean enabled) Deprecated.void
Deprecated.Sets the given value as text.boolean
setValue
(Object newValue, ParamExceptionHandler handler) Deprecated.Sets the given value as text.void
setValueAsText
(String textValue) Deprecated.Sets the value given as text.boolean
setValueAsText
(String textValue, ParamExceptionHandler handler) Deprecated.Sets the value given as text.void
setValueSet
(String[] valueSet) Deprecated.void
updateUI()
Deprecated.void
validateValue
(Object value) Deprecated.
-
Constructor Details
-
Parameter
Deprecated. -
Parameter
Deprecated. -
Parameter
Deprecated. -
Parameter
Deprecated.
-
-
Method Details
-
getName
Deprecated.Returns the name of this parameter -
getType
Deprecated.Returns the value type of this parameter -
getValue
Deprecated.Returns the current value of this parameter. -
setValue
Deprecated.Sets the given value as text. The method first validates the given value before sets it to this parameter's value.- Parameters:
newValue
- the new value to be set- Throws:
ParamValidateException
-
setValue
Deprecated.Sets the given value as text. The method first validates the given value before sets it to this parameter's value.Any
ParamValidateException
occurring while performing the validation are delegated to the given exception handler (if any).- Parameters:
newValue
- the new value to be sethandler
- an exception handler- Returns:
true
if this parameter's value has been changed- Throws:
IllegalArgumentException
- if the value could not be set andhandler
is null or the handler did not handle the error
-
setDefaultValue
public void setDefaultValue()Deprecated.Sets the value of this parameter to the default value specified in this parameter's attributes. -
getValueType
Deprecated.Returns the value type of this parameter. If the value type has not been specified in this parameter's attributes, the string type (java.lang.String.class
) is returned.- Returns:
- this parameter's value type, never
null
-
isTypeOf
Deprecated.Tests if this parameter's value type is a, is derived from or implements the given value type.The method should be used instead of the
instanceof
operator in order to determine whether this parameter's value is compatible with a given class (or interface). That is, if the parameter's value isnull
, theinstanceof
operator would simply returnfalse
.- Parameters:
valueType
- the value type- Returns:
true
, if this parameter's value type is a, is derived from or implements the given value type
-
isLegalValue
Deprecated.Tests if the given value is a legal value for this parameter.- Returns:
true
if so
-
getProperties
Deprecated.Returns additional parameter information. Parameter informations are provided as a set of attributes. The value returned is guaranteed to be always different fromnull
.- Returns:
- the parameter information, never
null
-
setProperties
Deprecated.Sets the additional parameter information. Parameter informations are provided as a set of attributes.- Parameters:
properties
- the additional parameter information, must not benull
-
setValueAsText
Deprecated.Sets the value given as text.The method first parses the given text then validates the resulting object and finally sets this parameter to the validated object.
- Parameters:
textValue
- the text value to be parsed, validated and set- Throws:
ParamParseException
- if the given text value could not be converted to the required parameter typeParamValidateException
- if the parsed value is not valid
-
setValueAsText
Deprecated.Sets the value given as text.The method first parses the given text then validates the resulting object and finally sets this parameter to the validated object.
Any
ParamParseException
orParamValidateException
occurring during parsing and validation are delegated to the given exception handler (if any).- Parameters:
textValue
- the text value to be parsed, validated and sethandler
- an exception handler- Returns:
true
if this parameter's value has been changed- Throws:
IllegalArgumentException
- if the value could not be set andhandler
is null or the handler did not handle the error
-
getValueAsText
Deprecated.Returns the value of this parameter as string or an empty string.- Returns:
- the value of this parameter as string or an empty string.
-
parseValue
Deprecated.- Throws:
ParamParseException
-
formatValue
Deprecated.- Throws:
ParamFormatException
-
validateValue
Deprecated.- Throws:
ParamValidateException
-
equalsValue
Deprecated. -
setPropertyValues
Deprecated. -
getValidator
Deprecated. -
createValidator
Deprecated. -
getEditor
Deprecated. -
isUIEnabled
public boolean isUIEnabled()Deprecated. -
setUIEnabled
public void setUIEnabled(boolean enabled) Deprecated. -
updateUI
public void updateUI()Deprecated. -
createEditor
Deprecated.- Returns:
- an appropriate _editor for this parameter _properties, can be
null
if an instantiation error occurs
-
setValueSet
Deprecated. -
addParamChangeListener
Deprecated.Adds a parameter change listener to this parameter.- Parameters:
listener
- the listener to be added
-
removeParamChangeListener
Deprecated.Removes the parameter change listener from this parameter.- Parameters:
listener
- the listener to be removed
-
fireParamValueChanged
Deprecated.
-
Ceres Binding API
instead