|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.esa.beam.framework.param.Parameter
Ceres Binding API instead
@Deprecated public class Parameter
A 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.
ParamProperties,
ParamEditor,
ParamValidator| Constructor Summary | |
|---|---|
Parameter(String name)
Deprecated. |
|
Parameter(String name,
Object value)
Deprecated. |
|
Parameter(String name,
Object value,
ParamProperties properties)
Deprecated. |
|
Parameter(String name,
ParamProperties properties)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addParamChangeListener(ParamChangeListener listener)
Deprecated. Adds a parameter change listener to this parameter. |
protected ParamEditor |
createEditor()
Deprecated. |
protected ParamValidator |
createValidator()
Deprecated. |
boolean |
equalsValue(Object value)
Deprecated. |
protected void |
fireParamValueChanged(Parameter parameter,
Object oldValue)
Deprecated. |
String |
formatValue(Object value)
Deprecated. |
ParamEditor |
getEditor()
Deprecated. |
String |
getName()
Deprecated. Returns the name of this parameter |
ParamProperties |
getProperties()
Deprecated. Returns additional parameter information. |
Class |
getType()
Deprecated. Returns the value type of this parameter |
ParamValidator |
getValidator()
Deprecated. |
Object |
getValue()
Deprecated. Returns the current value of this parameter. |
String |
getValueAsText()
Deprecated. Returns the value of this parameter as string or an empty string. |
Class |
getValueType()
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 |
isTypeOf(Class valueType)
Deprecated. Tests if this parameter's value type is a, is derived from or implements the given value type. |
boolean |
isUIEnabled()
Deprecated. |
Object |
parseValue(String text)
Deprecated. |
void |
removeParamChangeListener(ParamChangeListener listener)
Deprecated. Removes the parameter change listener from this parameter. |
void |
setDefaultValue()
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 |
setValue(Object newValue)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parameter(String name)
public Parameter(String name,
Object value)
public Parameter(String name,
ParamProperties properties)
public Parameter(String name,
Object value,
ParamProperties properties)
| Method Detail |
|---|
public String getName()
public Class getType()
public Object getValue()
public void setValue(Object newValue)
throws ParamValidateException
newValue - the new value to be set
ParamValidateException
public boolean setValue(Object newValue,
ParamExceptionHandler handler)
Any ParamValidateException occurring while performing the validation are delegated to the given
exception handler (if any).
newValue - the new value to be sethandler - an exception handler
true if this parameter's value has been changed
IllegalArgumentException - if the value could not be set and handler is null or the handler
did not handle the errorpublic void setDefaultValue()
public Class getValueType()
java.lang.String.class) is returned.
nullpublic boolean isTypeOf(Class valueType)
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 is
null, the instanceof operator would simply return false.
valueType - the value type
true, if this parameter's value type is a, is derived from or implements the given value
typepublic boolean isLegalValue(Object value)
true if sopublic ParamProperties getProperties()
null.
nullpublic void setProperties(ParamProperties properties)
properties - the additional parameter information, must not be null
public void setValueAsText(String textValue)
throws ParamParseException,
ParamValidateException
The method first parses the given text then validates the resulting object and finally sets this parameter to the validated object.
textValue - the text value to be parsed, validated and set
ParamParseException - if the given text value could not be converted to the required parameter type
ParamValidateException - if the parsed value is not valid
public boolean setValueAsText(String textValue,
ParamExceptionHandler handler)
The method first parses the given text then validates the resulting object and finally sets this parameter to the validated object.
Any ParamParseException or ParamValidateException occurring during parsing and
validation are delegated to the given exception handler (if any).
textValue - the text value to be parsed, validated and sethandler - an exception handler
true if this parameter's value has been changed
IllegalArgumentException - if the value could not be set and handler is null or the handler
did not handle the errorpublic String getValueAsText()
public Object parseValue(String text)
throws ParamParseException
ParamParseException
public String formatValue(Object value)
throws ParamFormatException
ParamFormatException
public void validateValue(Object value)
throws ParamValidateException
ParamValidateExceptionpublic boolean equalsValue(Object value)
public void setPropertyValues(PropertyMap propertyMap)
public ParamValidator getValidator()
protected ParamValidator createValidator()
public ParamEditor getEditor()
public boolean isUIEnabled()
public void setUIEnabled(boolean enabled)
public void updateUI()
protected ParamEditor createEditor()
null if an instantiation error
occurspublic void setValueSet(String[] valueSet)
public void addParamChangeListener(ParamChangeListener listener)
listener - the listener to be addedpublic void removeParamChangeListener(ParamChangeListener listener)
listener - the listener to be removed
protected void fireParamValueChanged(Parameter parameter,
Object oldValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||