Class MouseEventParams.Builder

java.lang.Object
com.teamdev.jxbrowser.dom.event.MouseEventParams.Builder
Enclosing interface:
MouseEventParams

public static final class MouseEventParams.Builder extends Object
A builder of MouseEventParams.

Builders are created by invoking MouseEventParams.newBuilder(). Each of the setter methods modifies the state of the builder and returns the same instance. Builders are not thread-safe and should not be used concurrently from multiple threads without external synchronization.

  • Method Details

    • uiEventModifierParams

      public MouseEventParams.Builder uiEventModifierParams(UiEventModifierParams uiEventModifierParams)
      Sets the DOM UI event parameters with the key modifiers.
      Parameters:
      uiEventModifierParams - the DOM UI event parameters with the key modifiers
      Returns:
      this builder
    • clientLocation

      public MouseEventParams.Builder clientLocation(Point location)
      Sets the location of the mouse cursor in the component's coordinate system at the time the event occurred.
      Parameters:
      location - the location of the mouse cursor in the component's coordinate system at the time the event occurred
      Returns:
      this builder
    • screenLocation

      public MouseEventParams.Builder screenLocation(Point location)
      Sets the location of the mouse cursor in the screen's coordinate system at the time the event occurred.
      Parameters:
      location - the location of the mouse cursor in the screen's coordinate system at the time the event occurred
      Returns:
      this builder
    • button

      Sets the mouse button that triggered the event.
      Parameters:
      button - the mouse button that triggered the event
      Returns:
      this builder
    • clickCount

      public MouseEventParams.Builder clickCount(int clickCount)
      Sets the count of consecutive clicks that happened in a short amount of time for mouse events.
      Parameters:
      clickCount - the count of consecutive clicks that happened in a short amount of time for mouse events
      Returns:
      this builder
    • build

      public MouseEventParams build()
      Returns a new MouseEventParams instance built from the current state of this builder.
      Returns:
      a new MouseEventParams instance