Package com.install4j.api
Class UiUtil
java.lang.Object
com.install4j.api.UiUtil
This class contains methods that deal with global properties of the installer application GUI.
When running in console or unattended mode, these methods can still be called, although they may not have any effect or return any helpful information.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LookAndFeelEnhancer
Returns the currently active look and feel info.static Window
Get the window of the installer application.static boolean
Returns if the desktop environment is in dark mode or not.static boolean
isDarkUi()
Returns if the installer application is running in dark mode or not.static void
setDarkUi
(boolean dark) Switch between dark and light mode and update all windows with the new mode.
-
Constructor Details
-
UiUtil
public UiUtil()
-
-
Method Details
-
isDarkDesktop
public static boolean isDarkDesktop()Returns if the desktop environment is in dark mode or not.To check whether the installer application is running with a dark look and feel, you should call
isDarkUi()
instead. If you have selected the FlatLaf look and feel for installer applications with dark mode auto-detection enabled, both methods will return the same value. -
isDarkUi
public static boolean isDarkUi()Returns if the installer application is running in dark mode or not.This is a convenience method for calling
LookAndFeelEnhancer.getInstance().isDark()
- See Also:
-
setDarkUi
public static void setDarkUi(boolean dark) Switch between dark and light mode and update all windows with the new mode.This will only have an effect if
LookAndFeelEnhancer.isDarkModeSwitchingSupported()
returnstrue
and if the installer application is running in GUI mode.- Parameters:
dark
-true
for dark mode
-
getLookAndFeelEnhancer
Returns the currently active look and feel info. -
getParentWindow
Get the window of the installer application.- Returns:
- the window or
null
if the installer application is running in console or unattended mode.
-