Class PaintModeParameter


  • public class PaintModeParameter
    extends uk.ac.starlink.task.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
    • 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.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​(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

        getUsage, objectToString, setDefaultOption, setUsage, stringToObject
      • Methods inherited from class uk.ac.starlink.task.AbstractChoiceParameter

        addOption, addOption, choiceToString, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, stringifyOption, stringToChoice
      • 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​(java.lang.String name,
                                  GraphicExporter[] exporters)
        Constructor.
        Parameters:
        name - parameter name
        exporters - 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.TaskException
        Sets 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