|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.config.ConfigKey<Double>
uk.ac.starlink.ttools.plot2.config.TimeConfigKey
public class TimeConfigKey
Config key for values in the time domain.
The value returned is a time in the domain defined by
TimeMapper
, that is unix seconds.
Field Summary | |
---|---|
static String |
FORMAT_XML
XML <p> element describing the text input format. |
Constructor Summary | |
---|---|
TimeConfigKey(ConfigMeta meta)
Constructs a key with no default value. |
|
TimeConfigKey(ConfigMeta meta,
double dfltUnixSeconds)
Constructs a key with a given default value. |
Method Summary | |
---|---|
Specifier<Double> |
createSpecifier()
Constructs a graphical control with which the user can specify a suitable value for association with this key. |
Double |
stringToValue(String txt)
Decodes a string value to the value type of this key. |
String |
valueToString(Double value)
Reports a value as a string. |
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 |
Field Detail |
---|
public static final String FORMAT_XML
Constructor Detail |
---|
public TimeConfigKey(ConfigMeta meta)
meta
- metadatapublic TimeConfigKey(ConfigMeta meta, double dfltUnixSeconds)
meta
- metadatadfltUnixSeconds
- default value as seconds since Unix epochMethod Detail |
---|
public String valueToString(Double value)
ConfigKey
stringToValue(valueToString(v)).equals(v)
.
A null value, if permitted, should be represented as an empty string.
valueToString
in class ConfigKey<Double>
value
- possible value associated with this key
public Double stringToValue(String txt) throws ConfigException
ConfigKey
stringToValue
in class ConfigKey<Double>
txt
- string representation of value
ConfigException
public Specifier<Double> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<Double>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |