Class ThemeManager
java.lang.Object
org.eclipse.nebula.widgets.nattable.style.theme.ThemeManager
The ThemeManager is used to register/unregister style configurations set by a
ThemeConfiguration
at runtime.-
Constructor Summary
ConstructorDescriptionThemeManager
(IConfigRegistry configRegistry) Creates a ThemeManager that is connected to the given IConfigRegistry. -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTheme
(ThemeConfiguration configuration) Apply the given ThemeConfiguration to the IConfigRegistry this ThemeManager is registered.protected void
This method is used to unregister the style configurations that were applied by the current set ThemeConfiguration.void
Re-applies the current active theme by simply re-registering all style configurations.
-
Constructor Details
-
ThemeManager
Creates a ThemeManager that is connected to the given IConfigRegistry.- Parameters:
configRegistry
- The IConfigRegistry the ThemeManager should be connected to.- Throws:
IllegalArgumentException
- if the given IConfigRegistry isnull
.
-
-
Method Details
-
applyTheme
Apply the given ThemeConfiguration to the IConfigRegistry this ThemeManager is registered.- Parameters:
configuration
- The ThemeConfiguration that should be applied to the IConfigRegistry this ThemeManager is registered to.
-
cleanThemeConfiguration
protected void cleanThemeConfiguration()This method is used to unregister the style configurations that were applied by the current set ThemeConfiguration. This is necessary to ensure to operate on a clean style state, so there are no style configurations still applied from a previous ThemeConfiguration. -
refreshCurrentTheme
public void refreshCurrentTheme()Re-applies the current active theme by simply re-registering all style configurations. This is for example needed for zoom operations when the painters need to be re-created for image rendering according to the current scaling.- Since:
- 2.0
-