Class GeneralUISettings
java.lang.Object
org.jjazz.uisettings.api.GeneralUISettings
Store general UI settings, manage the current and available Themes, the current and available Locales.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ColoradaptColorToLightThemeIfRequired(Color darkThemeColor, int luminanceOffset) Adjust color darker if LightTheme is used.static ImageIconadaptIconToLightThemeIfRequired(ImageIcon darkThemeIcon, int luminanceOffset) Adjust icon if LightTheme is used.voidbooleangetBoolean(String key) static GeneralUISettingsintGet the theme used for this session.Get the JJazzLab standard condensed font (for latin locales only) with size=10pt and style=PLAIN.Get the JJazzLab standard font (for latin locales only) with size=10pt and style=PLAIN.static ThemeGet the Theme with specified name.Get the theme name to be used on next application start.Get the available themes.static final booleanvoidvoidsetLocaleUponRestart(Locale locale) Set the locale to use upon next restart.voidsetThemeUponRestart(Theme theme, boolean silent) Set the theme to be used on next application start.
-
Field Details
-
PROP_LOCALE_UPON_RESTART
-
SUPPORTED_LOCALES
The list of currently supported locales by the application.
-
-
Method Details
-
getInstance
-
getThemes
-
getTheme
-
getSessionTheme
-
getThemeNameUponRestart
Get the theme name to be used on next application start.- Returns:
-
setThemeUponRestart
Set the theme to be used on next application start.This will restart the application. User is asked to confirm unless silent is true.
- Parameters:
theme-silent-
-
setLocaleUponRestart
Set the locale to use upon next restart.Add or replace the --locale code in the user conf file.
Fire a PROP_LOCALE_UPON_RESTART change event.- Parameters:
locale-- Throws:
IOException- If a problem occured
-
getStdFont
Get the JJazzLab standard font (for latin locales only) with size=10pt and style=PLAIN.- Returns:
-
getStdCondensedFont
Get the JJazzLab standard condensed font (for latin locales only) with size=10pt and style=PLAIN.- Returns:
-
adaptColorToLightThemeIfRequired
-
adaptIconToLightThemeIfRequired
-
addPropertyChangeListener
-
removePropertyChangeListener
-
isDarkTheme
public static final boolean isDarkTheme() -
getIcon
-
getColor
-
getFont
-
getBoolean
-
getBorder
-
getInt
-