Class VaadinSwingEventBuilder

java.lang.Object
com.vaadin.swingkit.core.VaadinSwingEventBuilder

public final class VaadinSwingEventBuilder extends Object
A builder for VaadinSwingEvent instances.
  • Constructor Details

    • VaadinSwingEventBuilder

      public VaadinSwingEventBuilder(String type)
      Creates a builder of VaadinSwingEvent objects of a certain type.
      Parameters:
      type - the type of events to create.
      See Also:
  • Method Details

    • type

      public VaadinSwingEventBuilder type(String type)
      Set the type of events to create.
      Parameters:
      type - the type of events to create.
      Returns:
      the same builder, for chaining calls.
      See Also:
    • addParam

      public VaadinSwingEventBuilder addParam(String name, Serializable value)
      Add data to be added to the created events.
      Parameters:
      name - the parameter key.
      value - the parameter value.
      Returns:
      the same builder, for chaining calls.
    • removeParam

      public VaadinSwingEventBuilder removeParam(String name)
      Removes a parameter.
      Parameters:
      name - the key of the parameter to remove.
      Returns:
      the same builder, for chaining calls.
    • clearParams

      public VaadinSwingEventBuilder clearParams()
      Removes all parameters from the builder.
      Returns:
      the same builder, for chaining calls.
    • build

      public VaadinSwingEvent build()
      Creates a new VaadinSwingEvent instance with the configuration of this builder.
      Returns:
      a new VaadinSwingEvent.