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 thePerspectiveTransform
class.static PerspectiveTransformBuilder
create()
Returns an instance of thePerspectiveTransformBuilder
.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
.A builder method that invokes thesetInput
method on the instance being constructed.Applies a function to theinputProperty
of the instance being constructed.llx
(double value) A builder method that invokes thesetLlx
method on the instance being constructed.Applies a function to thellxProperty
of the instance being constructed.lly
(double value) A builder method that invokes thesetLly
method on the instance being constructed.Applies a function to thellyProperty
of the instance being constructed.lrx
(double value) A builder method that invokes thesetLrx
method on the instance being constructed.Applies a function to thelrxProperty
of the instance being constructed.lry
(double value) A builder method that invokes thesetLry
method on the instance being constructed.Applies a function to thelryProperty
of the instance being constructed.ulx
(double value) A builder method that invokes thesetUlx
method on the instance being constructed.Applies a function to theulxProperty
of the instance being constructed.uly
(double value) A builder method that invokes thesetUly
method on the instance being constructed.Applies a function to theulyProperty
of the instance being constructed.urx
(double value) A builder method that invokes thesetUrx
method on the instance being constructed.Applies a function to theurxProperty
of the instance being constructed.ury
(double value) A builder method that invokes thesetUry
method on the instance being constructed.Applies a function to theuryProperty
of 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 thePerspectiveTransform
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
PerspectiveTransform
class
-
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 thesetInput
method on the instance being constructed.- Returns:
- builder instance
-
llx
A builder method that invokes thesetLlx
method on the instance being constructed.- Returns:
- builder instance
-
lly
A builder method that invokes thesetLly
method on the instance being constructed.- Returns:
- builder instance
-
lrx
A builder method that invokes thesetLrx
method on the instance being constructed.- Returns:
- builder instance
-
lry
A builder method that invokes thesetLry
method on the instance being constructed.- Returns:
- builder instance
-
ulx
A builder method that invokes thesetUlx
method on the instance being constructed.- Returns:
- builder instance
-
uly
A builder method that invokes thesetUly
method on the instance being constructed.- Returns:
- builder instance
-
urx
A builder method that invokes thesetUrx
method on the instance being constructed.- Returns:
- builder instance
-
ury
A builder method that invokes thesetUry
method on the instance being constructed.- Returns:
- builder instance
-
inputPropertyApply
Applies a function to theinputProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thellxProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thellyProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thelrxProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thelryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theulxProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theulyProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theurxProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theuryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.uryProperty().bind(anotherProperty)) // Use shorthand form .uryPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-