|
|||||||||
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<Integer>
uk.ac.starlink.ttools.plot2.config.IntegerConfigKey
public abstract class IntegerConfigKey
Config key for integer values.
Constructor Summary | |
---|---|
protected |
IntegerConfigKey(ConfigMeta meta,
int dflt)
Constructor. |
Method Summary | |
---|---|
static IntegerConfigKey |
createSliderKey(ConfigMeta meta,
int dflt,
double lo,
double hi,
boolean log)
Returns a config key that uses a SliderSpecifier. |
static IntegerConfigKey |
createSpinnerKey(ConfigMeta meta,
int dflt,
int lo,
int hi)
Returns a config key that uses a JSpinner for the specifier. |
Integer |
stringToValue(String txt)
Decodes a string value to the value type of this key. |
String |
valueToString(Integer value)
Reports a value as a string. |
Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigKey |
---|
cast, createSpecifier, getDefaultValue, getMeta, getValueClass, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected IntegerConfigKey(ConfigMeta meta, int dflt)
meta
- metadatadflt
- default valueMethod Detail |
---|
public Integer stringToValue(String txt) throws ConfigException
ConfigKey
stringToValue
in class ConfigKey<Integer>
txt
- string representation of value
ConfigException
public String valueToString(Integer value)
ConfigKey
stringToValue(valueToString(v)).equals(v)
.
A null value, if permitted, should be represented as an empty string.
valueToString
in class ConfigKey<Integer>
value
- possible value associated with this key
public static IntegerConfigKey createSpinnerKey(ConfigMeta meta, int dflt, int lo, int hi)
meta
- metadatadflt
- default valuelo
- minimum value offered by spinnerhi
- maximum value offered by spinnerpublic static IntegerConfigKey createSliderKey(ConfigMeta meta, int dflt, double lo, double hi, boolean log)
meta
- metadatadflt
- default valuelo
- minimum of slider rangehi
- maximum of slider rangelog
- true for logarithmic scale, false for linear
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |