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.
      configRegistry - The IConfigRegistry the ThemeManager should be connected to.
      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.
      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.