Package com.install4j.api.laf
Interface LookAndFeelHandler
-
- All Superinterfaces:
LookAndFeelEnhancer
public interface LookAndFeelHandler extends LookAndFeelEnhancer
A look and feel handler can apply a look and feel. An implementation of this class together with its dependencies can be added on the "Installer->Custom Code & Resources" step and can then be configured on the "Installer->Look & Feel" step.The super-interface
LookAndFeelEnhancer
contains a number of methods with default implementations that can be overridden in order to customize certain aspects of creating the UI.
-
-
Field Summary
-
Fields inherited from interface com.install4j.api.laf.LookAndFeelEnhancer
DEFAULT_LIGHT_TITLE_COLOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
applyLookAndFeel(boolean darkDesktop)
Called when the installer application is ready to apply the look and feel.default void
setDark(boolean dark)
Switch between dark and light mode.-
Methods inherited from interface com.install4j.api.laf.LookAndFeelEnhancer
createTriStateCheckBox, disableExtraSelectionPainting, getAlertFont, getFileChooserLowerAccessoryInset, getTitleColor, isDark, isDarkModeSwitchingSupported, isPreventTransparency, isWideTreeSelection, prepareWindow
-
-
-
-
Method Detail
-
applyLookAndFeel
void applyLookAndFeel(boolean darkDesktop) throws java.lang.Exception
Called when the installer application is ready to apply the look and feel.- Parameters:
darkDesktop
- if the desktop is detected to be in dark mode. This auto-detection is implemented for Windows 10 and macOS.- Throws:
java.lang.Exception
-
setDark
default void setDark(boolean dark)
Switch between dark and light mode. This method will be called when user code invokesUiUtil.setDarkUi(boolean)
, that method will also update the component hierarchy in all windows.By default, this method throws an
UnsupportedOperationException
. If it is implemented,LookAndFeelEnhancer.isDarkModeSwitchingSupported()
must be overridden to returntrue
.- Parameters:
dark
-true
for dark mode- See Also:
UiUtil.setDarkUi(boolean)
-
-