Class MouseDragEventBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.MouseDragEventBuilder
The
MouseDragEventBuilder
class constructs instances of the MouseDragEvent
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 MouseDragEvent
constructor
and returns an instance of the MouseDragEventBuilder
.
You can use method chaining to call the builder methods for configuring the MouseDragEvent
.
Finally, invoke the build
method to generate an instance of the MouseDragEvent
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<MouseDragEvent> func) Applies a function to the MouseDragEvent instance being constructed.build()
Builds and returns an instance of theMouseDragEvent
class.static MouseDragEventBuilder
create
(Object source, EventTarget target, EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean backButtonDown, boolean forwardButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(Object, EventTarget, EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.static MouseDragEventBuilder
create
(Object source, EventTarget target, EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(Object, EventTarget, EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.static MouseDragEventBuilder
create
(EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.dragDetect
(boolean dragDetect) A builder method that invokes thesetDragDetect
method on the instance being constructed.
-
Method Details
-
create
public static MouseDragEventBuilder create(Object source, EventTarget target, EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean backButtonDown, boolean forwardButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(Object, EventTarget, EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.- Returns:
- an instance of the
MouseDragEventBuilder
.
-
create
public static MouseDragEventBuilder create(Object source, EventTarget target, EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(Object, EventTarget, EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.- Returns:
- an instance of the
MouseDragEventBuilder
.
-
create
public static MouseDragEventBuilder create(EventType<MouseDragEvent> eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, boolean middleButtonDown, boolean secondaryButtonDown, boolean synthesized, boolean popupTrigger, PickResult pickResult, Object gestureSource) Accepts the constructor arguments ofMouseDragEvent(EventType, double, double, double, double, MouseButton, int, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, PickResult, Object)
and returns an instance ofMouseDragEventBuilder
.- Returns:
- an instance of the
MouseDragEventBuilder
.
-
build
Builds and returns an instance of theMouseDragEvent
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
MouseDragEvent
class
-
apply
Applies a function to the MouseDragEvent instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
dragDetect
A builder method that invokes thesetDragDetect
method on the instance being constructed.- Returns:
- builder instance
-