public static final class MouseWheel.Builder
extends java.lang.Object
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.
Modifier and Type | Method and Description |
---|---|
MouseWheel |
build()
Returns a new
MouseWheel instance built from the current state of this builder. |
MouseWheel.Builder |
horizontalScroll(boolean horizontalScroll)
Specifies whether it is a horizontal scroll.
|
MouseWheel.Builder |
keyModifiers(KeyModifiers keyModifiers)
Sets the keyboard modifiers applied.
|
MouseWheel.Builder |
locationOnScreen(Point locationOnScreen)
Sets the mouse position relative to the bounds of the screen.
|
MouseWheel.Builder |
scrollbarPixelsPerLine(int scrollbarPixelsPerLine)
Sets the number of pixels per line for scrolling.
|
MouseWheel.Builder |
scrollType(ScrollType scrollType)
Sets the scroll type of the event.
|
MouseWheel.Builder |
unitsToScroll(int unitsToScroll)
Sets the number of units to scroll.
|
public MouseWheel.Builder locationOnScreen(Point locationOnScreen)
locationOnScreen
- the mouse positionpublic MouseWheel.Builder keyModifiers(KeyModifiers keyModifiers)
keyModifiers
- the keyboard modifierspublic MouseWheel.Builder scrollType(ScrollType scrollType)
scrollType
- the scroll typepublic MouseWheel.Builder unitsToScroll(int unitsToScroll)
unitsToScroll
- the number of unitspublic MouseWheel.Builder scrollbarPixelsPerLine(int scrollbarPixelsPerLine)
scrollbarPixelsPerLine
- the number of pixels per linepublic MouseWheel.Builder horizontalScroll(boolean horizontalScroll)
horizontalScroll
- the flag valuepublic MouseWheel build()
MouseWheel
instance built from the current state of this builder.MouseWheel
instance