Class StyleParameter<T>

java.lang.Object
uk.ac.starlink.task.Parameter<T>
uk.ac.starlink.task.AbstractChoiceParameter<T,T>
uk.ac.starlink.task.ChoiceParameter<T>
uk.ac.starlink.ttools.plottask.StyleParameter<T>
Direct Known Subclasses:
FontParameter, ShaderParameter

public class StyleParameter<T> extends uk.ac.starlink.task.ChoiceParameter<T>
ChoiceParameter subclass suitable for use with plotting style configuration. Adds a few useful customisations.
Since:
8 Aug 2008
Author:
Mark Taylor
  • Field Summary

    Fields inherited from class uk.ac.starlink.task.Parameter

    BY_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    StyleParameter(String name, Class<T> clazz)
    Constructs a StyleParameter without initialising any options.
    StyleParameter(String name, T[] options)
    Constructs a StyleParameter with a given list of options.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a formatted XML string giving an unordered list of the options for this parameter.
     
    void
     
     

    Methods inherited from class uk.ac.starlink.task.ChoiceParameter

    objectToString, setDefaultOption, stringToObject

    Methods inherited from class uk.ac.starlink.task.AbstractChoiceParameter

    addOption, addOption, choiceToString, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, 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 Details

    • StyleParameter

      public StyleParameter(String name, T[] options)
      Constructs a StyleParameter with a given list of options.
      Parameters:
      name - parameter name
      options - list of options
    • StyleParameter

      public StyleParameter(String name, Class<T> clazz)
      Constructs a StyleParameter without initialising any options.
      Parameters:
      name - parameter name
  • Method Details

    • setUsage

      public void setUsage(String usage)
      Overrides:
      setUsage in class uk.ac.starlink.task.ChoiceParameter<T>
    • getUsage

      public String getUsage()
      Overrides:
      getUsage in class uk.ac.starlink.task.ChoiceParameter<T>
    • getOptionList

      public String getOptionList()
      Returns a formatted XML string giving an unordered list of the options for this parameter. Suitable for insertion into a parameter description. Not enclosed in a <p> element.
      Returns:
      option list XML string
    • stringifyOption

      public String stringifyOption(T option)
      Overrides:
      stringifyOption in class uk.ac.starlink.task.AbstractChoiceParameter<T,T>