Package com.teamdev.jxbrowser.ui.event
Class MouseWheel.Builder
java.lang.Object
com.teamdev.jxbrowser.ui.event.MouseWheel.Builder
- Enclosing interface:
- MouseWheel
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 Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newMouseWheel
instance built from the current state of this builder.deltaX
(float deltaX) Sets the amount of units to scroll horizontally.deltaY
(float deltaY) Sets the amount of units to scroll vertically.keyModifiers
(KeyModifiers keyModifiers) Sets the keyboard modifiers applied.locationOnScreen
(Point locationOnScreen) Sets the mouse position relative to the bounds of the screen.scrollType
(ScrollType scrollType) Sets the scroll type of the event.
-
Method Details
-
locationOnScreen
Sets the mouse position relative to the bounds of the screen.- Parameters:
locationOnScreen
- the mouse position- Returns:
- this builder
-
keyModifiers
Sets the keyboard modifiers applied.- Parameters:
keyModifiers
- the keyboard modifiers- Returns:
- this builder
-
scrollType
Sets the scroll type of the event.- Parameters:
scrollType
- the scroll type- Returns:
- this builder
-
deltaX
Sets the amount of units to scroll horizontally.- Returns:
- this builder
-
deltaY
Sets the amount of units to scroll vertically.- Returns:
- this builder
-
build
Returns a newMouseWheel
instance built from the current state of this builder.- Returns:
- a new
MouseWheel
instance
-