Package ca.cgjennings.ui.theme
Class ThemeInstaller
- java.lang.Object
-
- ca.cgjennings.ui.theme.ThemeInstaller
-
public class ThemeInstaller extends java.lang.ObjectInstalls theThemespecified by the user's settings. If the theme cannot be installed, a series of fallback mechanisms will be tried, eventually ending with installing the system look and feel.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidensureBaselineLookAndFeelInstalled()This method will ensure that some kind of basic, familiar look and feel is installed.static ThemegetInstalledTheme()Returns the installed theme.static voidinstall()Installs a look and feel based on the user's preference setting.static booleanisDark()Convenience that returns whether the installed theme is dark, that returns a default if no theme is installed.
-
-
-
Method Detail
-
getInstalledTheme
public static Theme getInstalledTheme()
Returns the installed theme.- Returns:
- the installed theme
-
isDark
public static boolean isDark()
Convenience that returns whether the installed theme is dark, that returns a default if no theme is installed.- Returns:
- whether the installed theme is dark, or a default if none is installed
-
install
public static void install()
Installs a look and feel based on the user's preference setting.
-
ensureBaselineLookAndFeelInstalled
public static void ensureBaselineLookAndFeelInstalled()
This method will ensure that some kind of basic, familiar look and feel is installed. If the theme was successfully installed, it does nothing. Otherwise it will try to install one or more fallback look and feels.
-
-