java.lang.Object
com.realtime.crossfire.jxclient.settings.options.Option
Direct Known Subclasses:
CheckBoxOption

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

    • Option

      public Option()
  • Method Details

    • 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