public class ShaderConfigKey extends ChoiceConfigKey<Shader>
Constructor and Description |
---|
ShaderConfigKey(ConfigMeta meta,
Shader[] shaders,
Shader dflt)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ShaderConfigKey |
appendShaderDescription()
Appends a list of the available shaders, as well as rules for
naming custom ones, to the end of the existing XML documentation
for this key.
|
static ConfigMeta |
createAxisMeta(String shortName,
String longName,
String axName)
Creates a key description suitable for a colour map applied to
a named axis.
|
Specifier<Shader> |
createSpecifier()
Constructs a graphical control with which the user can
specify a suitable value for association with this key.
|
Shader |
decodeString(String sval)
Takes a string, and attempts to turn it into an object which may
be a value for this key.
|
String |
stringifyValue(Shader value)
Takes an object which may be a value of this key,
and attempts to turn it into a string for reporting purposes.
|
addOption, getOptionMap, stringToValue, valueToString
cast, getDefaultValue, getMeta, getValueClass, toString
public ShaderConfigKey(ConfigMeta meta, Shader[] shaders, Shader dflt)
meta
- metadatashaders
- list of optionsdflt
- default valuepublic Shader decodeString(String sval)
ChoiceConfigKey
This method should be the opposite of ChoiceConfigKey.stringifyValue(T)
,
but does not need to be consistent with
stringToValue
or
valueToString
.
decodeString
in class ChoiceConfigKey<Shader>
sval
- string representationpublic String stringifyValue(Shader value)
ChoiceConfigKey
This method should if possible
be the opposite of ChoiceConfigKey.decodeString(java.lang.String)
,
but does not need to be consistent with
stringToValue
or
valueToString
.
If no round-trippable value is available, null should be returned.
stringifyValue
in class ChoiceConfigKey<Shader>
value
- typed objectpublic Specifier<Shader> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<Shader>
public ShaderConfigKey appendShaderDescription()
public static ConfigMeta createAxisMeta(String shortName, String longName, String axName)
shortName
- metadata short namelongName
- metadata long nameaxName
- user-readable name of axis to which this appliesCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.