|
|||||||||
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<T>
uk.ac.starlink.ttools.plot2.config.ChoiceConfigKey<float[]>
uk.ac.starlink.ttools.plot2.config.DashConfigKey
public class DashConfigKey
ConfigKey for selecting line dash types.
BasicStroke.getDashArray()
Constructor Summary | |
---|---|
DashConfigKey(ConfigMeta meta)
Constructor. |
Method Summary | |
---|---|
static ConfigMeta |
createDashMeta(String shortName,
String longName)
Returns a metadata object suitable for use with a DashConfigKey. |
Specifier<float[]> |
createSpecifier()
Constructs a graphical control with which the user can specify a suitable value for association with this key. |
float[] |
decodeString(String sval)
Takes a string, and attempts to turn it into an object which may be a value for this key. |
String |
stringifyValue(float[] dash)
Takes an object which may be a value of this key, and attempts to turn it into a string for reporting purposes. |
Methods inherited from class uk.ac.starlink.ttools.plot2.config.ChoiceConfigKey |
---|
addOption, getOptionMap, stringToValue, valueToString |
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 |
Constructor Detail |
---|
public DashConfigKey(ConfigMeta meta)
meta
- key metadataMethod Detail |
---|
public float[] 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<float[]>
sval
- string representation
public String stringifyValue(float[] dash)
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<float[]>
dash
- typed object
public Specifier<float[]> createSpecifier()
ConfigKey
createSpecifier
in class ConfigKey<float[]>
public static ConfigMeta createDashMeta(String shortName, String longName)
shortName
- short key namelongName
- long key name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |