Class SwipeEventBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.SwipeEventBuilder
The
SwipeEventBuilder
class constructs instances of the SwipeEvent
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 SwipeEvent
constructor
and returns an instance of the SwipeEventBuilder
.
You can use method chaining to call the builder methods for configuring the SwipeEvent
.
Finally, invoke the build
method to generate an instance of the SwipeEvent
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<SwipeEvent> func) Applies a function to the SwipeEvent instance being constructed.build()
Builds and returns an instance of theSwipeEvent
class.static SwipeEventBuilder
create
(Object source, EventTarget target, EventType<SwipeEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, int touchCount, PickResult pickResult) Accepts the constructor arguments ofSwipeEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, int, PickResult)
and returns an instance ofSwipeEventBuilder
.static SwipeEventBuilder
create
(EventType<SwipeEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, int touchCount, PickResult pickResult) Accepts the constructor arguments ofSwipeEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, int, PickResult)
and returns an instance ofSwipeEventBuilder
.
-
Method Details
-
create
public static SwipeEventBuilder create(Object source, EventTarget target, EventType<SwipeEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, int touchCount, PickResult pickResult) Accepts the constructor arguments ofSwipeEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, int, PickResult)
and returns an instance ofSwipeEventBuilder
.- Returns:
- an instance of the
SwipeEventBuilder
.
-
create
public static SwipeEventBuilder create(EventType<SwipeEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, int touchCount, PickResult pickResult) Accepts the constructor arguments ofSwipeEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, int, PickResult)
and returns an instance ofSwipeEventBuilder
.- Returns:
- an instance of the
SwipeEventBuilder
.
-
build
Builds and returns an instance of theSwipeEvent
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
SwipeEvent
class
-
apply
Applies a function to the SwipeEvent instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-