Class SubrangeConfigKey
java.lang.Object
uk.ac.starlink.ttools.plot2.config.ConfigKey<Subrange>
uk.ac.starlink.ttools.plot2.config.SubrangeConfigKey
Config key that specifies a Subrange.
- Since:
- 23 Feb 2013
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSubrangeConfigKey(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. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigMetacreateAxisSubMeta(String axname, String axisName) Returns a metadata object to describe a SubrangeConfigKey for use with a coordinate axis.static ConfigMetacreateShaderClipMeta(String axname, String axisName) Returns a metadaa object to describe a SubrangeConfigKey for use as a restriction on a colour ramp (Shader).Constructs 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(Subrange value) Reports a value as a string.Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigKey
cast, getDefaultValue, getMeta, getValueClass, toString
-
Constructor Details
-
SubrangeConfigKey
Constructs a key with a given default. Thevminandvmaxparameters do not impose any hard limits on the value associated with this key, but they influence the values offered by the Specifier component.- Parameters:
meta- metadatadflt- default subrangevmin- minimum value suggested by GUIvmax- maximum value suggested by GUI
-
SubrangeConfigKey
Constructs a key with the usual default. The default subrange covers the whole range 0..1.- Parameters:
meta- metadata
-
-
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<Subrange>- 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<Subrange>- Parameters:
txt- string representation of value- Returns:
- value
- Throws:
ConfigException
-
createSpecifier
Description copied from class:ConfigKeyConstructs a graphical control with which the user can specify a suitable value for association with this key.- Specified by:
createSpecifierin classConfigKey<Subrange>- Returns:
- new specifier
-
createAxisSubMeta
Returns a metadata object to describe a SubrangeConfigKey for use with a coordinate axis.- Parameters:
axname- abbreviated axis name (for CLI)axisName- full axis name (for GUI)- Returns:
- metadata object describing a subrange config key for an axis
-
createShaderClipMeta
Returns a metadaa object to describe a SubrangeConfigKey for use as a restriction on a colour ramp (Shader).- Parameters:
axname- abbreviated axis name (for CLI)axisName- full axis name (for GUI)- Returns:
- metadata object describing a subrange config key for a shader
-