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 |
deltaX(float deltaX)
Sets the amount of units to scroll horizontally.
|
MouseWheel.Builder |
deltaY(float deltaY)
Sets the amount of units to scroll vertically.
|
MouseWheel.Builder |
horizontalScroll(boolean horizontalScroll)
Deprecated.
use
deltaX(float) and deltaY(float) instead |
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)
Deprecated.
use
deltaX(float) and deltaY(float) instead |
MouseWheel.Builder |
scrollType(ScrollType scrollType)
Sets the scroll type of the event.
|
MouseWheel.Builder |
unitsToScroll(int unitsToScroll)
Deprecated.
use
deltaX(float) and deltaY(float) instead |
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 deltaX(float deltaX)
public MouseWheel.Builder deltaY(float deltaY)
@Deprecated public MouseWheel.Builder unitsToScroll(int unitsToScroll)
deltaX(float)
and deltaY(float)
insteadunitsToScroll
- the number of units@Deprecated public MouseWheel.Builder scrollbarPixelsPerLine(int scrollbarPixelsPerLine)
deltaX(float)
and deltaY(float)
insteadscrollbarPixelsPerLine
- the number of pixels per line@Deprecated public MouseWheel.Builder horizontalScroll(boolean horizontalScroll)
deltaX(float)
and deltaY(float)
insteadhorizontalScroll
- the flag valuepublic MouseWheel build()
MouseWheel
instance built from the current state of this builder.MouseWheel
instance