-
Notifications
You must be signed in to change notification settings - Fork 1
UserPreferencesManager Class
Natalie L edited this page Dec 5, 2024
·
1 revision
The UserPreferencesManager class is part of the services package
(package org.example.globalgoodsindex.services) .
It manages user preferences for settings such as theme and
language. The class uses java.util.prefs.Preferences to store and retrieve preferences locally.
The Preferences API provides a simple way to store application settings in a platform-independent manner.
- Stores the selected theme name in the system's preferences using the
THEME_KEY.
- Retrieves the stored theme using the
THEME_KEY. Defaults to'PrimerLight'if no theme is saved.
- Stores the selected language in the system's preferences using the
LANGUAGE_KEY.
- Retrieves the stored language using the
LANGUAGE_KEY. Defaults to'English'if no language is saved.