Package org.jjazz.uisettings.api
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
getBoolean
(String key) static GeneralUISettings
int
Get 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 Theme
Get the Theme with specified name.Get the theme name to be used on next application start.Get the available themes.void
installChangeValueWithMouseWheelSupport
(JComponent comp, MouseWheelListener compListener) Helper method to register/unregister a component and its MouseWheelListener depending on the PREF_VALUE_CHANGE_WITH_MOUSE_WHEEL value changes.boolean
static final boolean
static final boolean
void
void
setChangeValueWithMouseWheelEnabled
(boolean b) Users with trackpad or "touch motion" mouse like the Apple Magic mouse should set this to false.void
setLocaleUponRestart
(Locale locale) Set the locale to use upon next restart.void
setThemeUponRestart
(Theme theme, boolean silent) Set the theme to be used on next application start.
-
Field Details
-
PROP_LOCALE_UPON_RESTART
newValue=new locale- See Also:
-
SUPPORTED_LOCALES
The list of currently supported locales by the application.
-
-
Method Details
-
getInstance
-
getThemes
Get the available themes.- Returns:
-
getTheme
Get the Theme with specified name.- Parameters:
name
-def
-- Returns:
- Return def if no theme matching name.
-
getSessionTheme
Get the theme used for this session.- Returns:
- Can't be null
-
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
-
setChangeValueWithMouseWheelEnabled
public void setChangeValueWithMouseWheelEnabled(boolean b) Users with trackpad or "touch motion" mouse like the Apple Magic mouse should set this to false.Because these devices don't have a "unitary" scroll unit, therefore usually values change much too fast with these devices. Register/unregister all installed components via installChangeValueWithMouseWheelSupport().
Fire a PREF_VALUE_CHANGE_WITH_MOUSE_WHEEL change event.
- Parameters:
b
-
-
isChangeValueWithMouseWheelEnabled
public boolean isChangeValueWithMouseWheelEnabled() -
installChangeValueWithMouseWheelSupport
public void installChangeValueWithMouseWheelSupport(JComponent comp, MouseWheelListener compListener) Helper method to register/unregister a component and its MouseWheelListener depending on the PREF_VALUE_CHANGE_WITH_MOUSE_WHEEL value changes.- Parameters:
comp
-compListener
-
-
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:
-
addPropertyChangeListener
-
removePropertyChangeListener
-
isLatin
-
isDarkTheme
public static final boolean isDarkTheme() -
getIcon
-
getColor
-
getFont
-
getBoolean
-
getBorder
-
getInt
-