|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.task.Parameter<T>
uk.ac.starlink.ttools.plottask.NamedObjectParameter<Color>
uk.ac.starlink.ttools.plottask.ColorParameter
public class ColorParameter
Field Summary |
---|
Fields inherited from class uk.ac.starlink.task.Parameter |
---|
BY_NAME |
Constructor Summary | |
---|---|
ColorParameter(String name)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class uk.ac.starlink.ttools.plottask.NamedObjectParameter |
---|
addOption, getNames, getOptionList, getOptions, getUsage, setDefaultOption, setUsage, stringToObject |
Methods inherited from class uk.ac.starlink.task.Parameter |
---|
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColorParameter(String name)
name
- parameter nameMethod Detail |
---|
public Color colorValue(Environment env) throws TaskException
env
- execution environment
TaskException
public void setDefaultColor(Color color)
color
- colourpublic String toString(Color option)
NamedObjectParameter
toString
in class NamedObjectParameter<Color>
option
- object value
public Color fromString(String name)
NamedObjectParameter
The implementation must be such that
fromString(toString(o)).equals(o)
.
fromString
in class NamedObjectParameter<Color>
name
- option name
public String getFormatDescription()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |