Constructor and Description |
---|
SubrangeConfigKey(ConfigMeta meta)
Constructs a key with the usual default.
|
SubrangeConfigKey(ConfigMeta meta,
Subrange dflt,
double vmin,
double vmax)
Constructs a key with a given default.
|
Modifier and Type | Method and Description |
---|---|
static ConfigMeta |
createAxisSubMeta(String axname,
String axisName)
Returns a metadata object to describe a SubrangeConfigKey for use
with a coordinate axis.
|
static ConfigMeta |
createShaderClipMeta(String axname,
String axisName)
Returns a metadaa object to describe a SubrangeConfigKey for use
as a restriction on a colour ramp (Shader).
|
Specifier<Subrange> |
createSpecifier()
Constructs a graphical control with which the user can
specify a suitable value for association with this key.
|
Subrange |
stringToValue(String txt)
Decodes a string value to the value type of this key.
|
String |
valueToString(Subrange value)
Reports a value as a string.
|
cast, getDefaultValue, getMeta, getValueClass, toString
public SubrangeConfigKey(ConfigMeta meta, Subrange dflt, double vmin, double vmax)
vmin
and vmax
parameters
do not impose any hard limits on the value associated with this key,
but they influence the values offered by the Specifier component.meta
- metadatadflt
- default subrangevmin
- minimum value suggested by GUIvmax
- maximum value suggested by GUIpublic SubrangeConfigKey(ConfigMeta meta)
meta
- metadatapublic String valueToString(Subrange value)
ConfigKey
stringToValue(valueToString(v)).equals(v)
.
A null value, if permitted, should be represented as an empty string.valueToString
in class ConfigKey<Subrange>
value
- possible value associated with this keypublic Subrange stringToValue(String txt) throws ConfigException
ConfigKey
stringToValue
in class ConfigKey<Subrange>
txt
- string representation of valueConfigException
public Specifier<Subrange> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<Subrange>
public static ConfigMeta createAxisSubMeta(String axname, String axisName)
axname
- abbreviated axis name (for CLI)axisName
- full axis name (for GUI)public static ConfigMeta createShaderClipMeta(String axname, String axisName)
axname
- abbreviated axis name (for CLI)axisName
- full axis name (for GUI)Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.