Class GlobalPrefs

java.lang.Object
VASSAL.preferences.Prefs
VASSAL.preferences.GlobalPrefs
All Implemented Interfaces:
Closeable, AutoCloseable

public class GlobalPrefs extends Prefs
A set of global preferences shared by all modules. This superclass exists primarily to make sure that the Global Preferences file gets written whenever a preference setting is changed.
  • Constructor Details

  • Method Details

    • isDisableAutoWrite

      public boolean isDisableAutoWrite()
      Overrides:
      isDisableAutoWrite in class Prefs
      Returns:
      true if our auto-write function has been temporarily disabled.
    • setDisableAutoWrite

      public void setDisableAutoWrite(boolean b)
      Overrides:
      setDisableAutoWrite in class Prefs
      Parameters:
      b - true if auto-write function should be temporarily disabled; false to re-enable it.
    • saveGlobal

      public void saveGlobal()
      Save the global preferences
    • addOption

      public void addOption(String category, Configurer o, String prompt)
      Adds the preference, and adds a listener for property changes, so that global preference file will be automatically written after any change.
      Overrides:
      addOption in class Prefs
      Parameters:
      category - the tab under which to add the Configurer's controls in the editor window. If null, do not add controls.
      o - Configurer for the preference
      prompt - If non-null and the value was not read from the preferences file on initialization