Class AffineBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.AffineBuilder
The
AffineBuilder class constructs instances of the Affine 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 Affine constructor
and returns an instance of the AffineBuilder.
You can use method chaining to call the builder methods for configuring the Affine.
Finally, invoke the build method to generate an instance of the Affine 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 Affine instance being constructed.build()Builds and returns an instance of theAffineclass.static AffineBuildercreate()Returns an instance of theAffineBuilder.static AffineBuildercreate(double[] matrix, MatrixType type, int offset) Accepts the constructor arguments ofAffine(double..., MatrixType, int)and returns an instance ofAffineBuilder.static AffineBuildercreate(double mxx, double mxy, double tx, double myx, double myy, double ty) Accepts the constructor arguments ofAffine(double, double, double, double, double, double)and returns an instance ofAffineBuilder.static AffineBuildercreate(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz) Accepts the constructor arguments ofAffine(double, double, double, double, double, double, double, double, double, double, double, double)and returns an instance ofAffineBuilder.static AffineBuilderAccepts the constructor arguments ofAffine(Transform)and returns an instance ofAffineBuilder.element(MatrixType type, int row, int column, double value) A builder method that invokes thesetElementmethod on the instance being constructed.Applies a function to theidentityPropertyof the instance being constructed.mxx(double value) A builder method that invokes thesetMxxmethod on the instance being constructed.Applies a function to themxxPropertyof the instance being constructed.mxy(double value) A builder method that invokes thesetMxymethod on the instance being constructed.Applies a function to themxyPropertyof the instance being constructed.mxz(double value) A builder method that invokes thesetMxzmethod on the instance being constructed.Applies a function to themxzPropertyof the instance being constructed.myx(double value) A builder method that invokes thesetMyxmethod on the instance being constructed.Applies a function to themyxPropertyof the instance being constructed.myy(double value) A builder method that invokes thesetMyymethod on the instance being constructed.Applies a function to themyyPropertyof the instance being constructed.myz(double value) A builder method that invokes thesetMyzmethod on the instance being constructed.Applies a function to themyzPropertyof the instance being constructed.mzx(double value) A builder method that invokes thesetMzxmethod on the instance being constructed.Applies a function to themzxPropertyof the instance being constructed.mzy(double value) A builder method that invokes thesetMzymethod on the instance being constructed.Applies a function to themzyPropertyof the instance being constructed.mzz(double value) A builder method that invokes thesetMzzmethod on the instance being constructed.Applies a function to themzzPropertyof 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.A builder method that invokes thesetToIdentitymethod on the instance being constructed.toTransform(double[] matrix, MatrixType type, int offset) A builder method that invokes thesetToTransformmethod on the instance being constructed.toTransform(double mxx, double mxy, double tx, double myx, double myy, double ty) A builder method that invokes thesetToTransformmethod on the instance being constructed.toTransform(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz) A builder method that invokes thesetToTransformmethod on the instance being constructed.toTransform(Transform transform) A builder method that invokes thesetToTransformmethod on the instance being constructed.tx(double value) A builder method that invokes thesetTxmethod on the instance being constructed.Applies a function to thetxPropertyof the instance being constructed.ty(double value) A builder method that invokes thesetTymethod on the instance being constructed.Applies a function to thetype2DPropertyof the instance being constructed.Applies a function to thetyPropertyof the instance being constructed.tz(double value) A builder method that invokes thesetTzmethod on the instance being constructed.Applies a function to thetzPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of theAffineBuilder.- Returns:
- an instance of the
AffineBuilder.
-
create
public static AffineBuilder create(double mxx, double mxy, double tx, double myx, double myy, double ty) Accepts the constructor arguments ofAffine(double, double, double, double, double, double)and returns an instance ofAffineBuilder.- Returns:
- an instance of the
AffineBuilder.
-
create
public static AffineBuilder create(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz) Accepts the constructor arguments ofAffine(double, double, double, double, double, double, double, double, double, double, double, double)and returns an instance ofAffineBuilder.- Returns:
- an instance of the
AffineBuilder.
-
create
Accepts the constructor arguments ofAffine(double..., MatrixType, int)and returns an instance ofAffineBuilder.- Returns:
- an instance of the
AffineBuilder.
-
create
Accepts the constructor arguments ofAffine(Transform)and returns an instance ofAffineBuilder.- Returns:
- an instance of the
AffineBuilder.
-
build
-
apply
Applies a function to the Affine instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
element
A builder method that invokes thesetElementmethod on the instance being constructed.- Returns:
- builder instance
-
mxx
A builder method that invokes thesetMxxmethod on the instance being constructed.- Returns:
- builder instance
-
mxy
A builder method that invokes thesetMxymethod on the instance being constructed.- Returns:
- builder instance
-
mxz
A builder method that invokes thesetMxzmethod on the instance being constructed.- Returns:
- builder instance
-
myx
A builder method that invokes thesetMyxmethod on the instance being constructed.- Returns:
- builder instance
-
myy
A builder method that invokes thesetMyymethod on the instance being constructed.- Returns:
- builder instance
-
myz
A builder method that invokes thesetMyzmethod on the instance being constructed.- Returns:
- builder instance
-
mzx
A builder method that invokes thesetMzxmethod on the instance being constructed.- Returns:
- builder instance
-
mzy
A builder method that invokes thesetMzymethod on the instance being constructed.- Returns:
- builder instance
-
mzz
A builder method that invokes thesetMzzmethod on the instance being constructed.- Returns:
- builder instance
-
onTransformChanged
A builder method that invokes thesetOnTransformChangedmethod on the instance being constructed.- Returns:
- builder instance
-
toIdentity
A builder method that invokes thesetToIdentitymethod on the instance being constructed.- Returns:
- builder instance
-
toTransform
public AffineBuilder toTransform(double mxx, double mxy, double tx, double myx, double myy, double ty) A builder method that invokes thesetToTransformmethod on the instance being constructed.- Returns:
- builder instance
-
toTransform
public AffineBuilder toTransform(double mxx, double mxy, double mxz, double tx, double myx, double myy, double myz, double ty, double mzx, double mzy, double mzz, double tz) A builder method that invokes thesetToTransformmethod on the instance being constructed.- Returns:
- builder instance
-
toTransform
A builder method that invokes thesetToTransformmethod on the instance being constructed.- Returns:
- builder instance
-
toTransform
A builder method that invokes thesetToTransformmethod on the instance being constructed.- Returns:
- builder instance
-
tx
A builder method that invokes thesetTxmethod on the instance being constructed.- Returns:
- builder instance
-
ty
A builder method that invokes thesetTymethod on the instance being constructed.- Returns:
- builder instance
-
tz
A builder method that invokes thesetTzmethod 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
-
mxxPropertyApply
Applies a function to themxxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mxxProperty().bind(anotherProperty)) // Use shorthand form .mxxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
mxyPropertyApply
Applies a function to themxyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mxyProperty().bind(anotherProperty)) // Use shorthand form .mxyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
mxzPropertyApply
Applies a function to themxzPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mxzProperty().bind(anotherProperty)) // Use shorthand form .mxzPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
myxPropertyApply
Applies a function to themyxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.myxProperty().bind(anotherProperty)) // Use shorthand form .myxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
myyPropertyApply
Applies a function to themyyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.myyProperty().bind(anotherProperty)) // Use shorthand form .myyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
myzPropertyApply
Applies a function to themyzPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.myzProperty().bind(anotherProperty)) // Use shorthand form .myzPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
mzxPropertyApply
Applies a function to themzxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mzxProperty().bind(anotherProperty)) // Use shorthand form .mzxPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
mzyPropertyApply
Applies a function to themzyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mzyProperty().bind(anotherProperty)) // Use shorthand form .mzyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
mzzPropertyApply
Applies a function to themzzPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.mzzProperty().bind(anotherProperty)) // Use shorthand form .mzzPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
onTransformChangedPropertyApply
public AffineBuilder 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
-
txPropertyApply
Applies a function to thetxPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.txProperty().bind(anotherProperty)) // Use shorthand form .txPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
tyPropertyApply
Applies a function to thetyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.tyProperty().bind(anotherProperty)) // Use shorthand form .tyPropertyApply(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
-
tzPropertyApply
Applies a function to thetzPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.tzProperty().bind(anotherProperty)) // Use shorthand form .tzPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-