Class SkySysConfigKey
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<SkySys>
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.booleanIndicates 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) CallsvalueToStringrepeatedly looking for a match.valueToString(SkySys sys) Invokes thetoStringmethod of the supplied option.Methods inherited from class OptionConfigKey
addOptionsXml, createSpecifier, getOptions, getOptionsXml, setOptionUsageMethods inherited from class ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
-
Constructor Details
-
SkySysConfigKey
Constructor.The
isViewComparisonparameter 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:OptionConfigKeyInvokes thetoStringmethod of the supplied option. May be overridden.- Overrides:
valueToStringin classOptionConfigKey<SkySys>- Parameters:
sys- possible value associated with this key- Returns:
- string representation
-
stringToValue
Description copied from class:OptionConfigKeyCallsvalueToStringrepeatedly looking for a match. This means that ifvalueToStringis overridden it is usually not necessary to override this method.- Overrides:
stringToValuein classOptionConfigKey<SkySys>- Parameters:
str- string representation of value- Returns:
- value
- Throws:
ConfigException
-
getXmlDescription
Description copied from class:OptionConfigKeyReturns 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:
getXmlDescriptionin 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
-