Class RowConstraintsBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.RowConstraintsBuilder
The
RowConstraintsBuilder class constructs instances of the RowConstraints 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 RowConstraints constructor
and returns an instance of the RowConstraintsBuilder.
You can use method chaining to call the builder methods for configuring the RowConstraints.
Finally, invoke the build method to generate an instance of the RowConstraints 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<RowConstraints> func) Applies a function to the RowConstraints instance being constructed.build()Builds and returns an instance of theRowConstraintsclass.static RowConstraintsBuildercreate()Returns an instance of theRowConstraintsBuilder.static RowConstraintsBuildercreate(double height) Accepts the constructor arguments ofRowConstraints(double)and returns an instance ofRowConstraintsBuilder.static RowConstraintsBuildercreate(double minHeight, double prefHeight, double maxHeight) Accepts the constructor arguments ofRowConstraints(double, double, double)and returns an instance ofRowConstraintsBuilder.static RowConstraintsBuildercreate(double minHeight, double prefHeight, double maxHeight, Priority vgrow, VPos valignment, boolean fillHeight) Accepts the constructor arguments ofRowConstraints(double, double, double, Priority, VPos, boolean)and returns an instance ofRowConstraintsBuilder.fillHeight(boolean value) A builder method that invokes thesetFillHeightmethod on the instance being constructed.Applies a function to thefillHeightPropertyof the instance being constructed.maxHeight(double value) A builder method that invokes thesetMaxHeightmethod on the instance being constructed.Applies a function to themaxHeightPropertyof the instance being constructed.minHeight(double value) A builder method that invokes thesetMinHeightmethod on the instance being constructed.Applies a function to theminHeightPropertyof the instance being constructed.percentHeight(double value) A builder method that invokes thesetPercentHeightmethod on the instance being constructed.Applies a function to thepercentHeightPropertyof the instance being constructed.prefHeight(double value) A builder method that invokes thesetPrefHeightmethod on the instance being constructed.Applies a function to theprefHeightPropertyof the instance being constructed.valignment(VPos value) A builder method that invokes thesetValignmentmethod on the instance being constructed.Applies a function to thevalignmentPropertyof the instance being constructed.A builder method that invokes thesetVgrowmethod on the instance being constructed.Applies a function to thevgrowPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of theRowConstraintsBuilder.- Returns:
- an instance of the
RowConstraintsBuilder.
-
create
Accepts the constructor arguments ofRowConstraints(double)and returns an instance ofRowConstraintsBuilder.- Returns:
- an instance of the
RowConstraintsBuilder.
-
create
Accepts the constructor arguments ofRowConstraints(double, double, double)and returns an instance ofRowConstraintsBuilder.- Returns:
- an instance of the
RowConstraintsBuilder.
-
create
public static RowConstraintsBuilder create(double minHeight, double prefHeight, double maxHeight, Priority vgrow, VPos valignment, boolean fillHeight) Accepts the constructor arguments ofRowConstraints(double, double, double, Priority, VPos, boolean)and returns an instance ofRowConstraintsBuilder.- Returns:
- an instance of the
RowConstraintsBuilder.
-
build
Builds and returns an instance of theRowConstraintsclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
RowConstraintsclass
-
apply
Applies a function to the RowConstraints instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
fillHeight
A builder method that invokes thesetFillHeightmethod on the instance being constructed.- Returns:
- builder instance
-
maxHeight
A builder method that invokes thesetMaxHeightmethod on the instance being constructed.- Returns:
- builder instance
-
minHeight
A builder method that invokes thesetMinHeightmethod on the instance being constructed.- Returns:
- builder instance
-
percentHeight
A builder method that invokes thesetPercentHeightmethod on the instance being constructed.- Returns:
- builder instance
-
prefHeight
A builder method that invokes thesetPrefHeightmethod on the instance being constructed.- Returns:
- builder instance
-
valignment
A builder method that invokes thesetValignmentmethod on the instance being constructed.- Returns:
- builder instance
-
vgrow
A builder method that invokes thesetVgrowmethod on the instance being constructed.- Returns:
- builder instance
-
fillHeightPropertyApply
Applies a function to thefillHeightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.fillHeightProperty().bind(anotherProperty)) // Use shorthand form .fillHeightPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
maxHeightPropertyApply
Applies a function to themaxHeightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.maxHeightProperty().bind(anotherProperty)) // Use shorthand form .maxHeightPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
minHeightPropertyApply
Applies a function to theminHeightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.minHeightProperty().bind(anotherProperty)) // Use shorthand form .minHeightPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
percentHeightPropertyApply
Applies a function to thepercentHeightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.percentHeightProperty().bind(anotherProperty)) // Use shorthand form .percentHeightPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
prefHeightPropertyApply
Applies a function to theprefHeightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.prefHeightProperty().bind(anotherProperty)) // Use shorthand form .prefHeightPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
valignmentPropertyApply
Applies a function to thevalignmentPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.valignmentProperty().bind(anotherProperty)) // Use shorthand form .valignmentPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
vgrowPropertyApply
Applies a function to thevgrowPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.vgrowProperty().bind(anotherProperty)) // Use shorthand form .vgrowPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-