Package uk.ac.starlink.ttools.plottask
Class PaintModeParameter
- java.lang.Object
-
- uk.ac.starlink.task.Parameter<T>
-
- uk.ac.starlink.task.ChoiceParameter<PaintMode>
-
- uk.ac.starlink.ttools.plottask.PaintModeParameter
-
public class PaintModeParameter extends uk.ac.starlink.task.ChoiceParameter<PaintMode>
Parameter which obtains a Painter object.- Since:
- 4 Aug 2008
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description PaintModeParameter(java.lang.String name, GraphicExporter[] exporters)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description uk.ac.starlink.task.ChoiceParameter<GraphicExporter>getFormatParameter()Returns the parameter giving the graphics format to use.uk.ac.starlink.task.OutputStreamParametergetOutputParameter()Returns the parameter determining the output stream (if any) to use for the graphics output.PainterpainterValue(uk.ac.starlink.task.Environment env)Returns the value of this parameter as a Painter object.voidsetValueFromPainter(uk.ac.starlink.task.Environment env, Painter painter)Sets the value for this parameter directly from a painter object.-
Methods inherited from class uk.ac.starlink.task.ChoiceParameter
addOption, addOption, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, getUsage, objectToString, setDefaultOption, setUsage, stringifyOption, stringToObject
-
Methods inherited from class uk.ac.starlink.task.Parameter
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString
-
-
-
-
Constructor Detail
-
PaintModeParameter
public PaintModeParameter(java.lang.String name, GraphicExporter[] exporters)Constructor.- Parameters:
name- parameter nameexporters- list of graphic exporters for file output options
-
-
Method Detail
-
getOutputParameter
public uk.ac.starlink.task.OutputStreamParameter getOutputParameter()
Returns the parameter determining the output stream (if any) to use for the graphics output. Not relevant for all modes.- Returns:
- output parameter
-
getFormatParameter
public uk.ac.starlink.task.ChoiceParameter<GraphicExporter> getFormatParameter()
Returns the parameter giving the graphics format to use. Not relevant for all modes.- Returns:
- format parameter
-
setValueFromPainter
public void setValueFromPainter(uk.ac.starlink.task.Environment env, Painter painter) throws uk.ac.starlink.task.TaskExceptionSets the value for this parameter directly from a painter object.- Parameters:
painter- value for parameter- Throws:
uk.ac.starlink.task.TaskException
-
painterValue
public Painter painterValue(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
Returns the value of this parameter as a Painter object.- Parameters:
env- execution environment- Returns:
- painter
- Throws:
uk.ac.starlink.task.TaskException
-
-