Class ScaleBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ScaleBuilder
The
ScaleBuilder
class constructs instances of the Scale
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 Scale
constructor
and returns an instance of the ScaleBuilder
.
You can use method chaining to call the builder methods for configuring the Scale
.
Finally, invoke the build
method to generate an instance of the Scale
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 Scale instance being constructed.build()
Builds and returns an instance of theScale
class.static ScaleBuilder
create()
Returns an instance of theScaleBuilder
.static ScaleBuilder
create
(double x, double y) Accepts the constructor arguments ofScale(double, double)
and returns an instance ofScaleBuilder
.static ScaleBuilder
create
(double x, double y, double z) Accepts the constructor arguments ofScale(double, double, double)
and returns an instance ofScaleBuilder
.static ScaleBuilder
create
(double x, double y, double pivotX, double pivotY) Accepts the constructor arguments ofScale(double, double, double, double)
and returns an instance ofScaleBuilder
.static ScaleBuilder
create
(double x, double y, double z, double pivotX, double pivotY, double pivotZ) Accepts the constructor arguments ofScale(double, double, double, double, double, double)
and returns an instance ofScaleBuilder
.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.x
(double value) A builder method that invokes thesetX
method on the instance being constructed.Applies a function to thexProperty
of the instance being constructed.y
(double value) A builder method that invokes thesetY
method on the instance being constructed.Applies a function to theyProperty
of the instance being constructed.z
(double value) A builder method that invokes thesetZ
method on the instance being constructed.Applies a function to thezProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theScaleBuilder
.- Returns:
- an instance of the
ScaleBuilder
.
-
create
Accepts the constructor arguments ofScale(double, double)
and returns an instance ofScaleBuilder
.- Returns:
- an instance of the
ScaleBuilder
.
-
create
Accepts the constructor arguments ofScale(double, double, double)
and returns an instance ofScaleBuilder
.- Returns:
- an instance of the
ScaleBuilder
.
-
create
Accepts the constructor arguments ofScale(double, double, double, double)
and returns an instance ofScaleBuilder
.- Returns:
- an instance of the
ScaleBuilder
.
-
create
public static ScaleBuilder create(double x, double y, double z, double pivotX, double pivotY, double pivotZ) Accepts the constructor arguments ofScale(double, double, double, double, double, double)
and returns an instance ofScaleBuilder
.- Returns:
- an instance of the
ScaleBuilder
.
-
build
Builds and returns an instance of theScale
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
Scale
class
-
apply
Applies a function to the Scale instance being constructed. Most operations on the instance can be performed using this method.- 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
-
x
A builder method that invokes thesetX
method on the instance being constructed.- Returns:
- builder instance
-
y
A builder method that invokes thesetY
method on the instance being constructed.- Returns:
- builder instance
-
z
A builder method that invokes thesetZ
method on the instance being constructed.- 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 ScaleBuilder 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
-
xPropertyApply
Applies a function to thexProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.xProperty().bind(anotherProperty)) // Use shorthand form .xPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
yPropertyApply
Applies a function to theyProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.yProperty().bind(anotherProperty)) // Use shorthand form .yPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
zPropertyApply
Applies a function to thezProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.zProperty().bind(anotherProperty)) // Use shorthand form .zPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-