Class ZoomEventBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ZoomEventBuilder
The
ZoomEventBuilder class constructs instances of the ZoomEvent 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 ZoomEvent constructor
and returns an instance of the ZoomEventBuilder.
You can use method chaining to call the builder methods for configuring the ZoomEvent.
Finally, invoke the build method to generate an instance of the ZoomEvent 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 ZoomEvent instance being constructed.build()Builds and returns an instance of theZoomEventclass.static ZoomEventBuildercreate(Object source, EventTarget target, EventType<ZoomEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double zoomFactor, double totalZoomFactor, PickResult pickResult) Accepts the constructor arguments ofZoomEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, PickResult)and returns an instance ofZoomEventBuilder.static ZoomEventBuildercreate(EventType<ZoomEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double zoomFactor, double totalZoomFactor, PickResult pickResult) Accepts the constructor arguments ofZoomEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, PickResult)and returns an instance ofZoomEventBuilder.
-
Method Details
-
create
public static ZoomEventBuilder create(Object source, EventTarget target, EventType<ZoomEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double zoomFactor, double totalZoomFactor, PickResult pickResult) Accepts the constructor arguments ofZoomEvent(Object, EventTarget, EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, PickResult)and returns an instance ofZoomEventBuilder.- Returns:
- an instance of the
ZoomEventBuilder.
-
create
public static ZoomEventBuilder create(EventType<ZoomEvent> eventType, double x, double y, double screenX, double screenY, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean direct, boolean inertia, double zoomFactor, double totalZoomFactor, PickResult pickResult) Accepts the constructor arguments ofZoomEvent(EventType, double, double, double, double, boolean, boolean, boolean, boolean, boolean, boolean, double, double, PickResult)and returns an instance ofZoomEventBuilder.- Returns:
- an instance of the
ZoomEventBuilder.
-
build
-
apply
Applies a function to the ZoomEvent instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-