Package loci.plugins.prefs
Class StringOption
java.lang.Object
loci.plugins.prefs.Option
loci.plugins.prefs.StringOption
A string option for one of the plugins.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStringOption(String key, boolean save, String label, String info, String defaultValue, Vector<String> possibleValues) Constructs a string option with the given parameters.StringOption(HashMap<String, String> entry) Constructs a string option with the parameters from the given map. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPossible(String val) Adds a possible value to the list.Gets the default value of the option.Gets the list of possible values.getValue()Gets the current value of the option.voidLoads the option's value from the ImageJ preferences file.Parses a string of comma-separated values into a list of tokens.voidparseOption(String arg) Parses the option's value from the given argument string.voidremovePossible(String val) Removes a possible value from the list.voidSaves the option's value to the ImageJ preferences file.voidSets the current value of the option.
-
Field Details
-
INI_POSSIBLE
INI key indicating option's possible values.- See Also:
-
defaultValue
The option's default value. -
possibleValues
List of possible values. -
value
The option's current value.
-
-
Constructor Details
-
StringOption
Constructs a string option with the parameters from the given map. -
StringOption
public StringOption(String key, boolean save, String label, String info, String defaultValue, Vector<String> possibleValues) Constructs a string option with the given parameters. If possible values list is null, any string value is allowed.
-
-
Method Details
-
parseList
Parses a string of comma-separated values into a list of tokens. -
getPossible
Gets the list of possible values. -
addPossible
Adds a possible value to the list. -
removePossible
Removes a possible value from the list. -
getDefault
Gets the default value of the option. -
getValue
Gets the current value of the option. -
setValue
Sets the current value of the option. -
parseOption
Description copied from class:OptionParses the option's value from the given argument string.- Specified by:
parseOptionin classOption
-
loadOption
public void loadOption()Description copied from class:OptionLoads the option's value from the ImageJ preferences file.- Specified by:
loadOptionin classOption
-
saveOption
public void saveOption()Description copied from class:OptionSaves the option's value to the ImageJ preferences file.- Specified by:
saveOptionin classOption
-