Class PerspectiveTransformBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.PerspectiveTransformBuilder
The
PerspectiveTransformBuilder class constructs instances of the PerspectiveTransform 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 PerspectiveTransform constructor
and returns an instance of the PerspectiveTransformBuilder.
You can use method chaining to call the builder methods for configuring the PerspectiveTransform.
Finally, invoke the build method to generate an instance of the PerspectiveTransform 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<PerspectiveTransform> func) Applies a function to the PerspectiveTransform instance being constructed.build()Builds and returns an instance of thePerspectiveTransformclass.static PerspectiveTransformBuildercreate()Returns an instance of thePerspectiveTransformBuilder.static PerspectiveTransformBuildercreate(double ulx, double uly, double urx, double ury, double lrx, double lry, double llx, double lly) Accepts the constructor arguments ofPerspectiveTransform(double, double, double, double, double, double, double, double)and returns an instance ofPerspectiveTransformBuilder.A builder method that invokes thesetInputmethod on the instance being constructed.Applies a function to theinputPropertyof the instance being constructed.llx(double value) A builder method that invokes thesetLlxmethod on the instance being constructed.Applies a function to thellxPropertyof the instance being constructed.lly(double value) A builder method that invokes thesetLlymethod on the instance being constructed.Applies a function to thellyPropertyof the instance being constructed.lrx(double value) A builder method that invokes thesetLrxmethod on the instance being constructed.Applies a function to thelrxPropertyof the instance being constructed.lry(double value) A builder method that invokes thesetLrymethod on the instance being constructed.Applies a function to thelryPropertyof the instance being constructed.ulx(double value) A builder method that invokes thesetUlxmethod on the instance being constructed.Applies a function to theulxPropertyof the instance being constructed.uly(double value) A builder method that invokes thesetUlymethod on the instance being constructed.Applies a function to theulyPropertyof the instance being constructed.urx(double value) A builder method that invokes thesetUrxmethod on the instance being constructed.Applies a function to theurxPropertyof the instance being constructed.ury(double value) A builder method that invokes thesetUrymethod on the instance being constructed.Applies a function to theuryPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of thePerspectiveTransformBuilder.- Returns:
- an instance of the
PerspectiveTransformBuilder.
-
create
public static PerspectiveTransformBuilder create(double ulx, double uly, double urx, double ury, double lrx, double lry, double llx, double lly) Accepts the constructor arguments ofPerspectiveTransform(double, double, double, double, double, double, double, double)and returns an instance ofPerspectiveTransformBuilder.- Returns:
- an instance of the
PerspectiveTransformBuilder.
-
build
Builds and returns an instance of thePerspectiveTransformclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
PerspectiveTransformclass
-
apply
Applies a function to the PerspectiveTransform instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
input
A builder method that invokes thesetInputmethod on the instance being constructed.- Returns:
- builder instance
-
llx
A builder method that invokes thesetLlxmethod on the instance being constructed.- Returns:
- builder instance
-
lly
A builder method that invokes thesetLlymethod on the instance being constructed.- Returns:
- builder instance
-
lrx
A builder method that invokes thesetLrxmethod on the instance being constructed.- Returns:
- builder instance
-
lry
A builder method that invokes thesetLrymethod on the instance being constructed.- Returns:
- builder instance
-
ulx
A builder method that invokes thesetUlxmethod on the instance being constructed.- Returns:
- builder instance
-
uly
A builder method that invokes thesetUlymethod on the instance being constructed.- Returns:
- builder instance
-
urx
A builder method that invokes thesetUrxmethod on the instance being constructed.- Returns:
- builder instance
-
ury
A builder method that invokes thesetUrymethod on the instance being constructed.- Returns:
- builder instance
-
inputPropertyApply
Applies a function to theinputPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.inputProperty().bind(anotherProperty)) // Use shorthand form .inputPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
llxPropertyApply
Applies a function to thellxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.llxProperty().bind(anotherProperty)) // Use shorthand form .llxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
llyPropertyApply
Applies a function to thellyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.llyProperty().bind(anotherProperty)) // Use shorthand form .llyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
lrxPropertyApply
Applies a function to thelrxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.lrxProperty().bind(anotherProperty)) // Use shorthand form .lrxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
lryPropertyApply
Applies a function to thelryPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.lryProperty().bind(anotherProperty)) // Use shorthand form .lryPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
ulxPropertyApply
Applies a function to theulxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.ulxProperty().bind(anotherProperty)) // Use shorthand form .ulxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
ulyPropertyApply
Applies a function to theulyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.ulyProperty().bind(anotherProperty)) // Use shorthand form .ulyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
urxPropertyApply
Applies a function to theurxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.urxProperty().bind(anotherProperty)) // Use shorthand form .urxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
uryPropertyApply
Applies a function to theuryPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.uryProperty().bind(anotherProperty)) // Use shorthand form .uryPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-