Class CompositionEvent

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CompositionEndEvent, CompositionStartEvent, CompositionUpdateEvent

public abstract class CompositionEvent extends ComponentEvent<Component>
Abstract class for composition events.
Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • CompositionEvent

      public CompositionEvent(Component source, boolean fromClient, String data, String locale)
      Creates a new composition event.
      Parameters:
      source - the component that fired the event
      fromClient - true if the event was originally fired on the client, false if the event originates from server-side logic
      data - the string being composed
      locale - language code for the composition event, if available; otherwise, the empty string
    • CompositionEvent

      public CompositionEvent(Component source)
      Creates a new server-side composition event with no additional information.
      Parameters:
      source - the component that fired the event
  • Method Details

    • getData

      public String getData()
      Gets the string being composed.
      Returns:
      the string being composed
    • getLocale

      public Optional<Locale> getLocale()
      Gets the optional Locale of the event.
      Returns:
      the optional Locale of the event