Class Option

java.lang.Object
loci.plugins.prefs.Option
Direct Known Subclasses:
BooleanOption, DoubleOption, StringOption

public abstract class Option extends Object
Base class for an option for one of the plugins.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    Documentation about the option, in HTML.
    static final String
    INI key indicating option's default value.
    static final String
    INI key indicating option's info.
    static final String
    INI key indicating option's key.
    static final String
    INI key indicating option's label.
    static final String
    INI key indicating whether option should be saved to prefs file.
    protected String
    Key name for ImageJ preferences file.
    static final String
    Prefix to use for all plugins preferences.
    protected String
    Label describing the option, for use with ImageJ dialogs.
    protected boolean
    Whether option state should be saved to ImageJ preferences file.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Option(String key, boolean save, String label, String info)
    Constructs an option with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets documentation about the option.
    Gets the option's key name.
    Gets label describing the option.
    boolean
    Gets whether option should be saved to ImageJ preferences file.
    abstract void
    Loads the option's value from the ImageJ preferences file.
    abstract void
    Parses the option's value from the given argument string.
    abstract void
    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 Details

    • KEY_PREFIX

      public static final String KEY_PREFIX
      Prefix to use for all plugins preferences.
      See Also:
    • INI_KEY

      public static final String INI_KEY
      INI key indicating option's key.
      See Also:
    • INI_SAVE

      public static final String INI_SAVE
      INI key indicating whether option should be saved to prefs file.
      See Also:
    • INI_LABEL

      public static final String INI_LABEL
      INI key indicating option's label.
      See Also:
    • INI_INFO

      public static final String INI_INFO
      INI key indicating option's info.
      See Also:
    • INI_DEFAULT

      public static final String INI_DEFAULT
      INI key indicating option's default value.
      See Also:
    • key

      protected String key
      Key name for ImageJ preferences file.
    • save

      protected boolean save
      Whether option state should be saved to ImageJ preferences file.
    • label

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

      protected String info
      Documentation about the option, in HTML.
  • Constructor Details

    • Option

      public Option(String key, boolean save, String label, String info)
      Constructs an option with the given parameters.
  • Method Details

    • getKey

      public String getKey()
      Gets the option's key name.
    • isSaved

      public boolean isSaved()
      Gets whether option should be saved to ImageJ preferences file.
    • getLabel

      public String getLabel()
      Gets label describing the option.
    • getInfo

      public String getInfo()
      Gets documentation about the option.
    • parseOption

      public abstract void parseOption(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.