uk.ac.starlink.ttools.plottask
Class PaintModeParameter

java.lang.Object
  extended by uk.ac.starlink.task.Parameter
      extended by uk.ac.starlink.task.ChoiceParameter
          extended by uk.ac.starlink.ttools.plottask.PaintModeParameter

public class PaintModeParameter
extends uk.ac.starlink.task.ChoiceParameter

Parameter which obtains a Painter object.

Since:
4 Aug 2008
Author:
Mark Taylor

Constructor Summary
PaintModeParameter(String name)
          Constructor.
 
Method Summary
 uk.ac.starlink.task.ChoiceParameter getFormatParameter()
          Returns the parameter giving the graphics format to use.
 uk.ac.starlink.task.OutputStreamParameter getOutputParameter()
          Returns the parameter determining the output stream (if any) to use for the graphics output.
 Painter painterValue(uk.ac.starlink.task.Environment env)
          Returns the value of this parameter as a Painter object.
 void setValueFromPainter(Painter painter)
          Sets the value for this parameter directly from a painter object.
 void setValueFromString(uk.ac.starlink.task.Environment env, String stringVal)
           
 
Methods inherited from class uk.ac.starlink.task.ChoiceParameter
addOption, addOption, getName, getOption, getOptionNames, getOptions, getUsage, objectValue, setDefaultOption, setUsage
 
Methods inherited from class uk.ac.starlink.task.Parameter
checkGotValue, clearValue, getDefault, getDescription, getName, getPosition, getPreferExplicit, getPrompt, isNullPermitted, setDefault, setDescription, setDescription, setGotValue, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringValue, stringValue, 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)
Constructor.

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

Returns:
format parameter

setValueFromString

public void setValueFromString(uk.ac.starlink.task.Environment env,
                               String stringVal)
                        throws uk.ac.starlink.task.TaskException
Overrides:
setValueFromString in class uk.ac.starlink.task.ChoiceParameter
Throws:
uk.ac.starlink.task.TaskException

setValueFromPainter

public void setValueFromPainter(Painter painter)
Sets the value for this parameter directly from a painter object.

Parameters:
painter - value for parameter

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


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