Class ScrollEventBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ScrollEventBuilder
The
ScrollEventBuilder class constructs instances of the ScrollEvent class
and offers a fluent interface for creating and configuring it.
This class includes a static create method that accepts the same arguments as the original ScrollEvent constructor
and returns an instance of the ScrollEventBuilder.
You can use method chaining to call the builder methods for configuring the ScrollEvent.
Finally, invoke the build method to generate an instance of the ScrollEvent class.
Note that intermediate builder methods are not evaluated until the build method
is called, meaning they are evaluated lazily.
- Author:
- Hidekazu Kubota <hidekazu.kubota@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionapply(Consumer<ScrollEvent> func) Applies a function to the ScrollEvent instance being constructed.build()Builds and returns an instance of theScrollEventclass.static ScrollEventBuildercreate(Object source, EventTarget target, EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.static ScrollEventBuildercreate(EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, double multiplierX, double multiplierY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.static ScrollEventBuildercreate(EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.
-
Method Details
-
create
public static ScrollEventBuilder create(Object source, EventTarget target, EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.- Returns:
- an instance of the
ScrollEventBuilder.
-
create
public static ScrollEventBuilder create(EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, double multiplierX, double multiplierY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.- Returns:
- an instance of the
ScrollEventBuilder.
-
create
public static ScrollEventBuilder create(EventType<ScrollEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double deltaX, double deltaY, double totalDeltaX, double totalDeltaY, ScrollEvent.HorizontalTextScrollUnits textDeltaXUnits, double textDeltaX, ScrollEvent.VerticalTextScrollUnits textDeltaYUnits, double textDeltaY, int touchCount, PickResult pickResult) Accepts the constructor arguments ofScrollEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, double, double, ScrollEvent.HorizontalTextScrollUnits, double, ScrollEvent.VerticalTextScrollUnits, double, int, PickResult)and returns an instance ofScrollEventBuilder.- Returns:
- an instance of the
ScrollEventBuilder.
-
build
Builds and returns an instance of theScrollEventclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
ScrollEventclass
-
apply
Applies a function to the ScrollEvent instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-