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

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

public class MultiPointConfigKey
extends OptionConfigKey<ErrorRenderer>

Config key that specifies a multi-point renderer. This goes by the name of an ErrorRenderer, but is just an object that draws some shape based on multiple data positions.

Since:
25 Feb 2013
Author:
Mark Taylor

Constructor Summary
MultiPointConfigKey(ConfigMeta meta, ErrorRenderer[] renderers, ErrorMode[] modes)
          Constructor.
 
Method Summary
 Specifier<ErrorRenderer> createSpecifier()
          Constructs a graphical control with which the user can specify a suitable value for association with this key.
 ErrorMode[] getErrorModes()
          Returns the error mode array used which combines with a renderer to work out how to paint an icon.
 String getXmlDescription(ErrorRenderer renderer)
          Returns a description in XML of the given option value.
 
Methods inherited from class uk.ac.starlink.ttools.plot2.config.OptionConfigKey
addOptionsXml, getOptions, getOptionsXml, setOptionUsage, stringToValue, valueToString
 
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

MultiPointConfigKey

public MultiPointConfigKey(ConfigMeta meta,
                           ErrorRenderer[] renderers,
                           ErrorMode[] modes)
Constructor.

Parameters:
meta - metadata
renderers - renderer options
modes - error mode objects, used with renderers to draw icon
Method Detail

getXmlDescription

public String getXmlDescription(ErrorRenderer renderer)
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<ErrorRenderer>
Parameters:
renderer - 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

getErrorModes

public ErrorMode[] getErrorModes()
Returns the error mode array used which combines with a renderer to work out how to paint an icon.

Returns:
error mode array

createSpecifier

public Specifier<ErrorRenderer> 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<ErrorRenderer>
Returns:
new specifier


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