Class StringOption

java.lang.Object
loci.plugins.prefs.Option
loci.plugins.prefs.StringOption

public class StringOption extends Option
A string option for one of the plugins.
  • Field Details

    • INI_POSSIBLE

      public static final String INI_POSSIBLE
      INI key indicating option's possible values.
      See Also:
    • defaultValue

      protected String defaultValue
      The option's default value.
    • possibleValues

      protected Vector<String> possibleValues
      List of possible values.
    • value

      protected String value
      The option's current value.
  • Constructor Details

    • StringOption

      public StringOption(HashMap<String,String> entry)
      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

      public static Vector<String> parseList(String s)
      Parses a string of comma-separated values into a list of tokens.
    • getPossible

      public Vector<String> getPossible()
      Gets the list of possible values.
    • addPossible

      public void addPossible(String val)
      Adds a possible value to the list.
    • removePossible

      public void removePossible(String val)
      Removes a possible value from the list.
    • getDefault

      public String getDefault()
      Gets the default value of the option.
    • getValue

      public String getValue()
      Gets the current value of the option.
    • setValue

      public void setValue(String value)
      Sets the current value of the option.
    • parseOption

      public void parseOption(String arg)
      Description copied from class: Option
      Parses the option's value from the given argument string.
      Specified by:
      parseOption in class Option
    • loadOption

      public void loadOption()
      Description copied from class: Option
      Loads the option's value from the ImageJ preferences file.
      Specified by:
      loadOption in class Option
    • saveOption

      public void saveOption()
      Description copied from class: Option
      Saves the option's value to the ImageJ preferences file.
      Specified by:
      saveOption in class Option