java.lang.Object
org.eclipse.nebula.widgets.nattable.style.theme.ThemeManager

public class ThemeManager extends Object
The ThemeManager is used to register/unregister style configurations set by a ThemeConfiguration at runtime.
  • Constructor Details

    • ThemeManager

      public ThemeManager(IConfigRegistry configRegistry)
      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 is null.
  • Method Details

    • applyTheme

      public void applyTheme(ThemeConfiguration configuration)
      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