public class ColorParameter extends NamedObjectParameter<Color>
| Constructor and Description |
|---|
ColorParameter(String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Color |
colorValue(Environment env)
Returns the value of this parameter as a Color object.
|
Color |
fromString(String name)
Translates a string value for this parameter into the object value
which it represents.
|
String |
getFormatDescription()
Returns an XML string, suitable for inclusion in a parameter description,
which explains the format of values accepted by this parameter.
|
void |
setDefaultColor(Color color)
Sets the default value of this parameter to a given color object.
|
String |
toString(Color option)
Translates a possible option value of this parameter into a string
which represents it as a string value.
|
addOption, getNames, getOptionList, getOptions, getUsage, setDefaultOption, setUsage, stringToObjectclearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toStringpublic ColorParameter(String name)
name - parameter namepublic Color colorValue(Environment env) throws TaskException
env - execution environmentTaskExceptionpublic void setDefaultColor(Color color)
color - colourpublic String toString(Color option)
NamedObjectParametertoString in class NamedObjectParameter<Color>option - object valuepublic Color fromString(String name)
NamedObjectParameterThe implementation must be such that
fromString(toString(o)).equals(o).
fromString in class NamedObjectParameter<Color>name - option namepublic String getFormatDescription()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.