Package VASSAL.preferences
Class GlobalPrefs
java.lang.Object
VASSAL.preferences.Prefs
VASSAL.preferences.GlobalPrefs
- All Implemented Interfaces:
Closeable,AutoCloseable
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.
-
Field Summary
Fields inherited from class VASSAL.preferences.Prefs
BAD_DATA_AUDIT_TRAILS, DISABLE_D3D, DISABLE_OGL_FBO, MAIN_WINDOW_HEIGHT, MAIN_WINDOW_REMEMBER, MAIN_WINDOW_WIDTH, MODULES_DIR_KEY, OVERRIDE_DEFAULT_FONT_SIZE, TRANSLATABLE_SUPPORT -
Constructor Summary
ConstructorsConstructorDescriptionGlobalPrefs(PrefsEditor editor, File file) GlobalPrefs(PrefsEditor editor, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOption(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.booleanvoidSave the global preferencesvoidsetDisableAutoWrite(boolean b)
-
Constructor Details
-
GlobalPrefs
-
GlobalPrefs
-
-
Method Details
-
isDisableAutoWrite
public boolean isDisableAutoWrite()- Overrides:
isDisableAutoWritein classPrefs- Returns:
- true if our auto-write function has been temporarily disabled.
-
setDisableAutoWrite
public void setDisableAutoWrite(boolean b) - Overrides:
setDisableAutoWritein classPrefs- 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
Adds the preference, and adds a listener for property changes, so that global preference file will be automatically written after any change.
-