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 thesetAngle
method on the instance being constructed.Applies a function to theangleProperty
of the instance being constructed.Applies a function to the Rotate instance being constructed.A builder method that invokes thesetAxis
method on the instance being constructed.Applies a function to theaxisProperty
of the instance being constructed.build()
Builds and returns an instance of theRotate
class.static RotateBuilder
create()
Returns an instance of theRotateBuilder
.static RotateBuilder
create
(double angle) Accepts the constructor arguments ofRotate(double)
and returns an instance ofRotateBuilder
.static RotateBuilder
create
(double angle, double pivotX, double pivotY) Accepts the constructor arguments ofRotate(double, double, double)
and returns an instance ofRotateBuilder
.static RotateBuilder
create
(double angle, double pivotX, double pivotY, double pivotZ) Accepts the constructor arguments ofRotate(double, double, double, double)
and returns an instance ofRotateBuilder
.static RotateBuilder
Accepts the constructor arguments ofRotate(double, double, double, double, Point3D)
and returns an instance ofRotateBuilder
.static RotateBuilder
Accepts the constructor arguments ofRotate(double, Point3D)
and returns an instance ofRotateBuilder
.Applies a function to theidentityProperty
of the instance being constructed.onTransformChanged
(EventHandler<? super TransformChangedEvent> value) A builder method that invokes thesetOnTransformChanged
method on the instance being constructed.onTransformChangedPropertyApply
(Consumer<ObjectProperty<EventHandler<? super TransformChangedEvent>>> op) Applies a function to theonTransformChangedProperty
of the instance being constructed.pivotX
(double value) A builder method that invokes thesetPivotX
method on the instance being constructed.Applies a function to thepivotXProperty
of the instance being constructed.pivotY
(double value) A builder method that invokes thesetPivotY
method on the instance being constructed.Applies a function to thepivotYProperty
of the instance being constructed.pivotZ
(double value) A builder method that invokes thesetPivotZ
method on the instance being constructed.Applies a function to thepivotZProperty
of the instance being constructed.Applies a function to thetype2DProperty
of 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 thesetAngle
method on the instance being constructed.- Returns:
- builder instance
-
axis
A builder method that invokes thesetAxis
method on the instance being constructed.- Returns:
- builder instance
-
onTransformChanged
A builder method that invokes thesetOnTransformChanged
method on the instance being constructed.- Returns:
- builder instance
-
pivotX
A builder method that invokes thesetPivotX
method on the instance being constructed.- Returns:
- builder instance
-
pivotY
A builder method that invokes thesetPivotY
method on the instance being constructed.- Returns:
- builder instance
-
pivotZ
A builder method that invokes thesetPivotZ
method on the instance being constructed.- Returns:
- builder instance
-
anglePropertyApply
Applies a function to theangleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theaxisProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theidentityProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theonTransformChangedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thepivotXProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thepivotYProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thepivotZProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thetype2DProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.type2DProperty().bind(anotherProperty)) // Use shorthand form .type2DPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-