Class TimeConfigKey
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<Double>
uk.ac.starlink.ttools.plot2.config.TimeConfigKey
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXML <p> element describing the text input format. -
Constructor Summary
ConstructorsConstructorDescriptionTimeConfigKey(ConfigMeta meta) Constructs a key with no default value.TimeConfigKey(ConfigMeta meta, double dfltUnixSeconds) Constructs a key with a given default value. -
Method Summary
Modifier and TypeMethodDescriptionConstructs a graphical control with which the user can specify a suitable value for association with this key.stringToValue(String txt) Decodes a string value to the value type of this key.valueToString(Double value) Reports a value as a string.Methods inherited from class ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
-
Field Details
-
FORMAT_XML
XML <p> element describing the text input format.
-
-
Constructor Details
-
TimeConfigKey
Constructs a key with no default value.- Parameters:
meta- metadata
-
TimeConfigKey
Constructs a key with a given default value.- Parameters:
meta- metadatadfltUnixSeconds- default value as seconds since Unix epoch
-
-
Method Details
-
valueToString
Description copied from class:ConfigKeyReports a value as a string. If at all possible the roundtripping should be possible, sostringToValue(valueToString(v)).equals(v). A null value, if permitted, should be represented as an empty string.- Specified by:
valueToStringin classConfigKey<Double>- Parameters:
value- possible value associated with this key- Returns:
- string representation
-
stringToValue
Description copied from class:ConfigKeyDecodes a string value to the value type of this key. An empty string should be interpreted as a null value, but this may cause an exception if null is not a permissible value for this key.- Specified by:
stringToValuein classConfigKey<Double>- Parameters:
txt- string representation of value- Returns:
- value
- Throws:
ConfigException
-
createSpecifier
-