Class RotateBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.RotateBuilder
The
RotateBuilder class constructs instances of the Rotate 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 Rotate constructor
and returns an instance of the RotateBuilder.
You can use method chaining to call the builder methods for configuring the Rotate.
Finally, invoke the build method to generate an instance of the Rotate 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 TypeMethodDescriptionangle(double value) A builder method that invokes thesetAnglemethod on the instance being constructed.Applies a function to theanglePropertyof the instance being constructed.Applies a function to the Rotate instance being constructed.A builder method that invokes thesetAxismethod on the instance being constructed.Applies a function to theaxisPropertyof the instance being constructed.build()Builds and returns an instance of theRotateclass.static RotateBuildercreate()Returns an instance of theRotateBuilder.static RotateBuildercreate(double angle) Accepts the constructor arguments ofRotate(double)and returns an instance ofRotateBuilder.static RotateBuildercreate(double angle, double pivotX, double pivotY) Accepts the constructor arguments ofRotate(double, double, double)and returns an instance ofRotateBuilder.static RotateBuildercreate(double angle, double pivotX, double pivotY, double pivotZ) Accepts the constructor arguments ofRotate(double, double, double, double)and returns an instance ofRotateBuilder.static RotateBuilderAccepts the constructor arguments ofRotate(double, double, double, double, Point3D)and returns an instance ofRotateBuilder.static RotateBuilderAccepts the constructor arguments ofRotate(double, Point3D)and returns an instance ofRotateBuilder.Applies a function to theidentityPropertyof the instance being constructed.onTransformChanged(EventHandler<? super TransformChangedEvent> value) A builder method that invokes thesetOnTransformChangedmethod on the instance being constructed.onTransformChangedPropertyApply(Consumer<ObjectProperty<EventHandler<? super TransformChangedEvent>>> op) Applies a function to theonTransformChangedPropertyof the instance being constructed.pivotX(double value) A builder method that invokes thesetPivotXmethod on the instance being constructed.Applies a function to thepivotXPropertyof the instance being constructed.pivotY(double value) A builder method that invokes thesetPivotYmethod on the instance being constructed.Applies a function to thepivotYPropertyof the instance being constructed.pivotZ(double value) A builder method that invokes thesetPivotZmethod on the instance being constructed.Applies a function to thepivotZPropertyof the instance being constructed.Applies a function to thetype2DPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of theRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
create
Accepts the constructor arguments ofRotate(double)and returns an instance ofRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
create
Accepts the constructor arguments ofRotate(double, double, double)and returns an instance ofRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
create
Accepts the constructor arguments ofRotate(double, double, double, double)and returns an instance ofRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
create
public static RotateBuilder create(double angle, double pivotX, double pivotY, double pivotZ, Point3D axis) Accepts the constructor arguments ofRotate(double, double, double, double, Point3D)and returns an instance ofRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
create
Accepts the constructor arguments ofRotate(double, Point3D)and returns an instance ofRotateBuilder.- Returns:
- an instance of the
RotateBuilder.
-
build
-
apply
Applies a function to the Rotate instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
angle
A builder method that invokes thesetAnglemethod on the instance being constructed.- Returns:
- builder instance
-
axis
A builder method that invokes thesetAxismethod on the instance being constructed.- Returns:
- builder instance
-
onTransformChanged
A builder method that invokes thesetOnTransformChangedmethod on the instance being constructed.- Returns:
- builder instance
-
pivotX
A builder method that invokes thesetPivotXmethod on the instance being constructed.- Returns:
- builder instance
-
pivotY
A builder method that invokes thesetPivotYmethod on the instance being constructed.- Returns:
- builder instance
-
pivotZ
A builder method that invokes thesetPivotZmethod on the instance being constructed.- Returns:
- builder instance
-
anglePropertyApply
Applies a function to theanglePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.angleProperty().bind(anotherProperty)) // Use shorthand form .anglePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
axisPropertyApply
Applies a function to theaxisPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.axisProperty().bind(anotherProperty)) // Use shorthand form .axisPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
identityPropertyApply
Applies a function to theidentityPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.identityProperty().bind(anotherProperty)) // Use shorthand form .identityPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
onTransformChangedPropertyApply
public RotateBuilder onTransformChangedPropertyApply(Consumer<ObjectProperty<EventHandler<? super TransformChangedEvent>>> op) Applies a function to theonTransformChangedPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.onTransformChangedProperty().bind(anotherProperty)) // Use shorthand form .onTransformChangedPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
pivotXPropertyApply
Applies a function to thepivotXPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.pivotXProperty().bind(anotherProperty)) // Use shorthand form .pivotXPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
pivotYPropertyApply
Applies a function to thepivotYPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.pivotYProperty().bind(anotherProperty)) // Use shorthand form .pivotYPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
pivotZPropertyApply
Applies a function to thepivotZPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.pivotZProperty().bind(anotherProperty)) // Use shorthand form .pivotZPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
type2DPropertyApply
Applies a function to thetype2DPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.type2DProperty().bind(anotherProperty)) // Use shorthand form .type2DPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-