Class SettingsManager
java.lang.Object
org.apache.log4j.chainsaw.prefs.SettingsManager
SettingManager allows components to register interest in Saving/Loading
of general application preferences/settings.
- Author:
- Paul Smith <psmith@apache.org>, Scott Deboy <sdeboy@apache.org>
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSettingsListener(SettingsListener listener) Registers the listener with the managervoidconfigure(SettingsListener listener) Returns the loaded default settings, which can be used by other classes within this package.static SettingsManagerReturns the singleton instance of the SettingsManagervoidRequests that the settings be loaded, all listeners will be notified of this call, and configure themselves according to the values found in the loaded settingsvoidCreates a SaveSettingsEvent and calls all the SettingsListeners to populate the properties with configuration information
-
Method Details
-
getInstance
Returns the singleton instance of the SettingsManager- Returns:
- settings manager
-
addSettingsListener
Registers the listener with the manager- Parameters:
listener-
-
loadSettings
public void loadSettings()Requests that the settings be loaded, all listeners will be notified of this call, and configure themselves according to the values found in the loaded settings -
saveSettings
public void saveSettings()Creates a SaveSettingsEvent and calls all the SettingsListeners to populate the properties with configuration information -
getSettingsDirectory
-
configure
-
getDefaultSettings
Returns the loaded default settings, which can be used by other classes within this package.- Returns:
- Properties defaults
-