Class MouseWheel.Builder

java.lang.Object
com.teamdev.jxbrowser.ui.event.MouseWheel.Builder
Enclosing interface:
MouseWheel

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

Builders are created by invoking MouseWheel.newBuilder(Point). 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

    • locationOnScreen

      public MouseWheel.Builder locationOnScreen(Point locationOnScreen)
      Sets the mouse position relative to the bounds of the screen.
      Parameters:
      locationOnScreen - the mouse position
      Returns:
      this builder
    • keyModifiers

      public MouseWheel.Builder keyModifiers(KeyModifiers keyModifiers)
      Sets the keyboard modifiers applied.
      Parameters:
      keyModifiers - the keyboard modifiers
      Returns:
      this builder
    • scrollType

      public MouseWheel.Builder scrollType(ScrollType scrollType)
      Sets the scroll type of the event.
      Parameters:
      scrollType - the scroll type
      Returns:
      this builder
    • deltaX

      public MouseWheel.Builder deltaX(float deltaX)
      Sets the amount of units to scroll horizontally.
      Returns:
      this builder
    • deltaY

      public MouseWheel.Builder deltaY(float deltaY)
      Sets the amount of units to scroll vertically.
      Returns:
      this builder
    • build

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