Class DragEventBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.DragEventBuilder
The
DragEventBuilder class constructs instances of the DragEvent 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 DragEvent constructor
and returns an instance of the DragEventBuilder.
You can use method chaining to call the builder methods for configuring the DragEvent.
Finally, invoke the build method to generate an instance of the DragEvent 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 TypeMethodDescriptionApplies a function to the DragEvent instance being constructed.build()Builds and returns an instance of theDragEventclass.static DragEventBuildercreate(Object source, EventTarget target, EventType<DragEvent> eventType, Dragboard dragboard, double x, double y, double screenX, double screenY, TransferMode transferMode, Object gestureSource, Object gestureTarget, PickResult pickResult) Accepts the constructor arguments ofDragEvent(Object, EventTarget, EventType, Dragboard, double, double, double, double, TransferMode, Object, Object, PickResult)and returns an instance ofDragEventBuilder.static DragEventBuildercreate(EventType<DragEvent> eventType, Dragboard dragboard, double x, double y, double screenX, double screenY, TransferMode transferMode, Object gestureSource, Object gestureTarget, PickResult pickResult) Accepts the constructor arguments ofDragEvent(EventType, Dragboard, double, double, double, double, TransferMode, Object, Object, PickResult)and returns an instance ofDragEventBuilder.dropCompleted(boolean isTransferDone) A builder method that invokes thesetDropCompletedmethod on the instance being constructed.
-
Method Details
-
create
public static DragEventBuilder create(Object source, EventTarget target, EventType<DragEvent> eventType, Dragboard dragboard, double x, double y, double screenX, double screenY, TransferMode transferMode, Object gestureSource, Object gestureTarget, PickResult pickResult) Accepts the constructor arguments ofDragEvent(Object, EventTarget, EventType, Dragboard, double, double, double, double, TransferMode, Object, Object, PickResult)and returns an instance ofDragEventBuilder.- Returns:
- an instance of the
DragEventBuilder.
-
create
public static DragEventBuilder create(EventType<DragEvent> eventType, Dragboard dragboard, double x, double y, double screenX, double screenY, TransferMode transferMode, Object gestureSource, Object gestureTarget, PickResult pickResult) Accepts the constructor arguments ofDragEvent(EventType, Dragboard, double, double, double, double, TransferMode, Object, Object, PickResult)and returns an instance ofDragEventBuilder.- Returns:
- an instance of the
DragEventBuilder.
-
build
-
apply
Applies a function to the DragEvent instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
dropCompleted
A builder method that invokes thesetDropCompletedmethod on the instance being constructed.- Returns:
- builder instance
-