Class ThemeChangeEvent

All Implemented Interfaces:
Serializable

public class ThemeChangeEvent extends ComponentEvent<Component>
Event fired when a theme change occurs in the application. It contains information about the new ColorScheme and DynamicTheme.
See Also:
  • Constructor Details

    • ThemeChangeEvent

      public ThemeChangeEvent(Component source, boolean fromClient, ColorScheme colorScheme, DynamicTheme dynamicTheme)
      Constructs a new ThemeChangeEvent.
      Parameters:
      source - the source component of the event
      fromClient - true if the event originated from the client side, false otherwise
      colorScheme - the new color scheme applied
      dynamicTheme - the new dynamic theme applied (may be null)
  • Method Details

    • getDynamicTheme

      public Optional<DynamicTheme> getDynamicTheme()
      Returns the dynamic theme applied, if any.
      Returns:
      an Optional containing the dynamic theme, or empty if dynamic theming is not initialized.