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