Class ApplicationThemeHandler

java.lang.Object
com.vaadin.copilot.CopilotCommand
com.vaadin.copilot.ApplicationThemeHandler

public class ApplicationThemeHandler extends CopilotCommand
Handles application theme-related commands received from the developer tools interface.

This handler listens for the "set-app-theme" command and updates the ApplicationDetectedThemeHolder with the new theme value provided in the command data.

Example usage:

 {
   "command": "set-app-theme",
   "data": { "theme": "aura" }
 }
 

The handler expects the JSON data to contain a "theme" field whose value corresponds to one of the supported ApplicationTheme constants.

See Also:
  • Constructor Details

    • ApplicationThemeHandler

      public ApplicationThemeHandler()
  • Method Details

    • handleMessage

      public boolean handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Description copied from class: CopilotCommand
      Called whenever there is a message from the browser. Implementations should check if the command is for them, handle it and return true if the command was handled.
      Specified by:
      handleMessage in class CopilotCommand
      Parameters:
      command - the command to handle
      data - the data for the command
      devToolsInterface - the devtools interface for the connection
      Returns:
      true if the command was handled, false otherwise