Class SkySysConfigKey
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<T>
uk.ac.starlink.ttools.plot2.config.OptionConfigKey<SkySys>
uk.ac.starlink.ttools.plot2.config.SkySysConfigKey
ConfigKey for selecting sky coordinate systems.
- Since:
- 10 Sep 2014
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSkySysConfigKey
(ConfigMeta meta, boolean includeNull, boolean isViewComparison) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetXmlDescription
(SkySys sys) Returns a description in XML of the given option value.boolean
Indicates whether this key is used to select a sky system that will be compared with the view system of the plot itself.stringToValue
(String str) CallsvalueToString
repeatedly looking for a match.valueToString
(SkySys sys) Invokes thetoString
method of the supplied option.Methods inherited from class uk.ac.starlink.ttools.plot2.config.OptionConfigKey
addOptionsXml, createSpecifier, getOptions, getOptionsXml, setOptionUsage
Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
-
Constructor Details
-
SkySysConfigKey
Constructor.The
isViewComparison
parameter does not affect the behaviour of this key itself, but may be used by external code that needs to know whether values configured here are resolved with reference to the sky system applying to the plot as a whole.- Parameters:
meta
- config key metadataincludeNull
- true iff null is a permitted optionisViewComparison
- true iff this key is used to configure a system that will be compared with the plot view system
-
-
Method Details
-
valueToString
Description copied from class:OptionConfigKey
Invokes thetoString
method of the supplied option. May be overridden.- Overrides:
valueToString
in classOptionConfigKey<SkySys>
- Parameters:
sys
- possible value associated with this key- Returns:
- string representation
-
stringToValue
Description copied from class:OptionConfigKey
CallsvalueToString
repeatedly looking for a match. This means that ifvalueToString
is overridden it is usually not necessary to override this method.- Overrides:
stringToValue
in classOptionConfigKey<SkySys>
- Parameters:
str
- string representation of value- Returns:
- value
- Throws:
ConfigException
-
getXmlDescription
Description copied from class:OptionConfigKey
Returns a description in XML of the given option value. This, along withOptionConfigKey.valueToString(T)
, is used by theOptionConfigKey.getOptionsXml()
method to assemble a described list of the options.- Specified by:
getXmlDescription
in classOptionConfigKey<SkySys>
- Parameters:
sys
- 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
-
isViewComparison
public boolean isViewComparison()Indicates whether this key is used to select a sky system that will be compared with the view system of the plot itself.- Returns:
- true for view comparison keys
-