public class StringOption extends Option
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
defaultValue
The option's default value.
|
static java.lang.String |
INI_POSSIBLE
INI key indicating option's possible values.
|
protected java.util.Vector<java.lang.String> |
possibleValues
List of possible values.
|
protected java.lang.String |
value
The option's current value.
|
Constructor and Description |
---|
StringOption(java.util.HashMap<java.lang.String,java.lang.String> entry)
Constructs a string option with the parameters from the given map.
|
StringOption(java.lang.String key,
boolean save,
java.lang.String label,
java.lang.String info,
java.lang.String defaultValue,
java.util.Vector<java.lang.String> possibleValues)
Constructs a string option with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addPossible(java.lang.String val)
Adds a possible value to the list.
|
java.lang.String |
getDefault()
Gets the default value of the option.
|
java.util.Vector<java.lang.String> |
getPossible()
Gets the list of possible values.
|
java.lang.String |
getValue()
Gets the current value of the option.
|
void |
loadOption()
Loads the option's value from the ImageJ preferences file.
|
static java.util.Vector<java.lang.String> |
parseList(java.lang.String s)
Parses a string of comma-separated values into a list of tokens.
|
void |
parseOption(java.lang.String arg)
Parses the option's value from the given argument string.
|
void |
removePossible(java.lang.String val)
Removes a possible value from the list.
|
void |
saveOption()
Saves the option's value to the ImageJ preferences file.
|
void |
setValue(java.lang.String value)
Sets the current value of the option.
|
public static final java.lang.String INI_POSSIBLE
protected java.lang.String defaultValue
protected java.util.Vector<java.lang.String> possibleValues
protected java.lang.String value
public StringOption(java.util.HashMap<java.lang.String,java.lang.String> entry)
public StringOption(java.lang.String key, boolean save, java.lang.String label, java.lang.String info, java.lang.String defaultValue, java.util.Vector<java.lang.String> possibleValues)
public static java.util.Vector<java.lang.String> parseList(java.lang.String s)
public java.util.Vector<java.lang.String> getPossible()
public void addPossible(java.lang.String val)
public void removePossible(java.lang.String val)
public java.lang.String getDefault()
public java.lang.String getValue()
public void setValue(java.lang.String value)
public void parseOption(java.lang.String arg)
Option
parseOption
in class Option
public void loadOption()
Option
loadOption
in class Option
public void saveOption()
Option
saveOption
in class Option
Copyright © 2017 Open Microscopy Environment