uk.ac.starlink.ttools.plot2.config
Class ShaderConfigKey

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.config.ConfigKey<T>
      extended by uk.ac.starlink.ttools.plot2.config.OptionConfigKey<Shader>
          extended by uk.ac.starlink.ttools.plot2.config.ShaderConfigKey

public class ShaderConfigKey
extends OptionConfigKey<Shader>

ConfigKey for selecting shader objects.

Since:
9 Sep 2014
Author:
Mark Taylor

Constructor Summary
ShaderConfigKey(ConfigMeta meta, Shader[] shaders, Shader dflt)
          Constructor.
 
Method Summary
 ShaderConfigKey appendShaderDescription()
          Appends a list of the available shaders to the end of the existing XML documentation for this key.
 Specifier<Shader> createSpecifier()
          Constructs a graphical control with which the user can specify a suitable value for association with this key.
 String getXmlDescription(Shader shader)
          Returns a description in XML of the given option value.
 String valueToString(Shader shader)
          Invokes the toString method of the supplied option.
 
Methods inherited from class uk.ac.starlink.ttools.plot2.config.OptionConfigKey
addOptionsXml, getOptions, getOptionsXml, setOptionUsage, stringToValue
 
Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShaderConfigKey

public ShaderConfigKey(ConfigMeta meta,
                       Shader[] shaders,
                       Shader dflt)
Constructor.

Parameters:
meta - metadata
shaders - list of options
dflt - default value
Method Detail

valueToString

public String valueToString(Shader shader)
Description copied from class: OptionConfigKey
Invokes the toString method of the supplied option. May be overridden.

Overrides:
valueToString in class OptionConfigKey<Shader>
Parameters:
shader - possible value associated with this key
Returns:
string representation

getXmlDescription

public String getXmlDescription(Shader shader)
Description copied from class: OptionConfigKey
Returns a description in XML of the given option value. This, along with OptionConfigKey.valueToString(T), is used by the OptionConfigKey.getOptionsXml() method to assemble a described list of the options.

Specified by:
getXmlDescription in class OptionConfigKey<Shader>
Parameters:
shader - possible value of this key
Returns:
short snippet of XML (not wrapped in any outer element) describing the value; may be null if no description required or available

createSpecifier

public Specifier<Shader> createSpecifier()
Description copied from class: ConfigKey
Constructs a graphical control with which the user can specify a suitable value for association with this key.

Overrides:
createSpecifier in class OptionConfigKey<Shader>
Returns:
new specifier

appendShaderDescription

public ShaderConfigKey appendShaderDescription()
Appends a list of the available shaders to the end of the existing XML documentation for this key.

Returns:
this object, as a convenience


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