Class ShearBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ShearBuilder
The
ShearBuilder class constructs instances of the Shear 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 Shear constructor
and returns an instance of the ShearBuilder.
You can use method chaining to call the builder methods for configuring the Shear.
Finally, invoke the build method to generate an instance of the Shear 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 Shear instance being constructed.build()Builds and returns an instance of theShearclass.static ShearBuildercreate()Returns an instance of theShearBuilder.static ShearBuildercreate(double x, double y) Accepts the constructor arguments ofShear(double, double)and returns an instance ofShearBuilder.static ShearBuildercreate(double x, double y, double pivotX, double pivotY) Accepts the constructor arguments ofShear(double, double, double, double)and returns an instance ofShearBuilder.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.Applies a function to thetype2DPropertyof the instance being constructed.x(double value) A builder method that invokes thesetXmethod on the instance being constructed.Applies a function to thexPropertyof the instance being constructed.y(double value) A builder method that invokes thesetYmethod on the instance being constructed.Applies a function to theyPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of theShearBuilder.- Returns:
- an instance of the
ShearBuilder.
-
create
Accepts the constructor arguments ofShear(double, double)and returns an instance ofShearBuilder.- Returns:
- an instance of the
ShearBuilder.
-
create
Accepts the constructor arguments ofShear(double, double, double, double)and returns an instance ofShearBuilder.- Returns:
- an instance of the
ShearBuilder.
-
build
-
apply
Applies a function to the Shear instance being constructed. Most operations on the instance can be performed using this method.- 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
-
x
A builder method that invokes thesetXmethod on the instance being constructed.- Returns:
- builder instance
-
y
A builder method that invokes thesetYmethod on the instance being constructed.- 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 ShearBuilder 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
-
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
-
xPropertyApply
-
yPropertyApply
-