Class Option

  • Direct Known Subclasses:
    CheckBoxOption

    public abstract class Option
    extends java.lang.Object
    The base class for all options. It manages a set of OptionListeners.
    • Constructor Detail

      • Option

        public Option()
    • Method Detail

      • fireStateChangedEvent

        protected void fireStateChangedEvent()
        Notifies all listeners that the state has changed.
      • addOptionListener

        public void addOptionListener​(@NotNull
                                      @NotNull OptionListener listener)
        Adds a listener for state changes.
        Parameters:
        listener - the listener to add
      • removeOptionListener

        public void removeOptionListener​(@NotNull
                                         @NotNull OptionListener listener)
        Removes a listener for state changes.
        Parameters:
        listener - the listener to remove
      • inhibitSave

        public boolean inhibitSave()
        Returns whether the option should not be saved. This function can be overridden for options that are otherwise saved, or for options that should not be saved at all.
        Returns:
        whether the option value should not be saved