uk.ac.starlink.ttools.plottask
Class PaintModeParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter<T>
      extended by uk.ac.starlink.task.ChoiceParameter<PaintMode>
          extended by uk.ac.starlink.ttools.plottask.PaintModeParameter

public class PaintModeParameter
extends ChoiceParameter<PaintMode>

Parameter which obtains a Painter object.

Since:
4 Aug 2008
Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.task.Parameter
BY_NAME
 
Constructor Summary
PaintModeParameter(String name, GraphicExporter[] exporters)
          Constructor.
 
Method Summary
 ChoiceParameter<GraphicExporter> getFormatParameter()
          Returns the parameter giving the graphics format to use.
 OutputStreamParameter getOutputParameter()
          Returns the parameter determining the output stream (if any) to use for the graphics output.
 Painter painterValue(Environment env)
          Returns the value of this parameter as a Painter object.
 void setValueFromPainter(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PaintModeParameter

public PaintModeParameter(String name,
                          GraphicExporter[] exporters)
Constructor.

Parameters:
name - parameter name
exporters - list of graphic exporters for file output options
Method Detail

getOutputParameter

public 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 ChoiceParameter<GraphicExporter> getFormatParameter()
Returns the parameter giving the graphics format to use. Not relevant for all modes.

Returns:
format parameter

setValueFromPainter

public void setValueFromPainter(Environment env,
                                Painter painter)
                         throws TaskException
Sets the value for this parameter directly from a painter object.

Parameters:
painter - value for parameter
Throws:
TaskException

painterValue

public Painter painterValue(Environment env)
                     throws TaskException
Returns the value of this parameter as a Painter object.

Parameters:
env - execution environment
Returns:
painter
Throws:
TaskException


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.