loci.plugins.prefs

## Class Option

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

- Direct Known Subclasses:
    BooleanOption, DoubleOption, StringOption

      public abstract class Option
      extends java.lang.Object

  Base class for an option for one of the plugins.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `info` Documentation about the option, in HTML.
    `static java.lang.String` | `INI_DEFAULT` INI key indicating option's default value.
    `static java.lang.String` | `INI_INFO` INI key indicating option's info.
    `static java.lang.String` | `INI_KEY` INI key indicating option's key.
    `static java.lang.String` | `INI_LABEL` INI key indicating option's label.
    `static java.lang.String` | `INI_SAVE` INI key indicating whether option should be saved to prefs file.
    `protected java.lang.String` | `key` Key name for ImageJ preferences file.
    `static java.lang.String` | `KEY_PREFIX` Prefix to use for all plugins preferences.
    `protected java.lang.String` | `label` Label describing the option, for use with ImageJ dialogs.
    `protected boolean` | `save` Whether option state should be saved to ImageJ preferences file.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Option(java.lang.String key, boolean save, java.lang.String label, java.lang.String info)` Constructs an option with the given parameters.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getInfo()` Gets documentation about the option.
    `java.lang.String` | `getKey()` Gets the option's key name.
    `java.lang.String` | `getLabel()` Gets label describing the option.
    `boolean` | `isSaved()` Gets whether option should be saved to ImageJ preferences file.
    `abstract void` | `loadOption()` Loads the option's value from the ImageJ preferences file.
    `abstract void` | `parseOption(java.lang.String arg)` Parses the option's value from the given argument string.
    `abstract void` | `saveOption()` Saves the option's value to the ImageJ preferences file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KEY_PREFIX

          public static final java.lang.String KEY_PREFIX

      Prefix to use for all plugins preferences.
      See Also:
        Constant Field Values

    - #### INI_KEY

          public static final java.lang.String INI_KEY

      INI key indicating option's key.
      See Also:
        Constant Field Values

    - #### INI_SAVE

          public static final java.lang.String INI_SAVE

      INI key indicating whether option should be saved to prefs file.
      See Also:
        Constant Field Values

    - #### INI_LABEL

          public static final java.lang.String INI_LABEL

      INI key indicating option's label.
      See Also:
        Constant Field Values

    - #### INI_INFO

          public static final java.lang.String INI_INFO

      INI key indicating option's info.
      See Also:
        Constant Field Values

    - #### INI_DEFAULT

          public static final java.lang.String INI_DEFAULT

      INI key indicating option's default value.
      See Also:
        Constant Field Values

    - #### key

          protected java.lang.String key

      Key name for ImageJ preferences file.

    - #### save

          protected boolean save

      Whether option state should be saved to ImageJ preferences file.

    - #### label

          protected java.lang.String label

      Label describing the option, for use with ImageJ dialogs. May contain underscores to produce a better macro variable name.

    - #### info

          protected java.lang.String info

      Documentation about the option, in HTML.

  - ### Constructor Detail

    - #### Option

          public Option(java.lang.String key,
                        boolean save,
                        java.lang.String label,
                        java.lang.String info)

      Constructs an option with the given parameters.

  - ### Method Detail

    - #### getKey

          public java.lang.String getKey()

      Gets the option's key name.

    - #### isSaved

          public boolean isSaved()

      Gets whether option should be saved to ImageJ preferences file.

    - #### getLabel

          public java.lang.String getLabel()

      Gets label describing the option.

    - #### getInfo

          public java.lang.String getInfo()

      Gets documentation about the option.

    - #### parseOption

          public abstract void parseOption(java.lang.String arg)

      Parses the option's value from the given argument string.

    - #### loadOption

          public abstract void loadOption()

      Loads the option's value from the ImageJ preferences file.

    - #### saveOption

          public abstract void saveOption()

      Saves the option's value to the ImageJ preferences file.

Copyright © 2026 Open Microscopy Environment