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 theRowConstraints
class.static RowConstraintsBuilder
create()
Returns an instance of theRowConstraintsBuilder
.static RowConstraintsBuilder
create
(double height) Accepts the constructor arguments ofRowConstraints(double)
and returns an instance ofRowConstraintsBuilder
.static RowConstraintsBuilder
create
(double minHeight, double prefHeight, double maxHeight) Accepts the constructor arguments ofRowConstraints(double, double, double)
and returns an instance ofRowConstraintsBuilder
.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
.fillHeight
(boolean value) A builder method that invokes thesetFillHeight
method on the instance being constructed.Applies a function to thefillHeightProperty
of the instance being constructed.maxHeight
(double value) A builder method that invokes thesetMaxHeight
method on the instance being constructed.Applies a function to themaxHeightProperty
of the instance being constructed.minHeight
(double value) A builder method that invokes thesetMinHeight
method on the instance being constructed.Applies a function to theminHeightProperty
of the instance being constructed.percentHeight
(double value) A builder method that invokes thesetPercentHeight
method on the instance being constructed.Applies a function to thepercentHeightProperty
of the instance being constructed.prefHeight
(double value) A builder method that invokes thesetPrefHeight
method on the instance being constructed.Applies a function to theprefHeightProperty
of the instance being constructed.valignment
(VPos value) A builder method that invokes thesetValignment
method on the instance being constructed.Applies a function to thevalignmentProperty
of the instance being constructed.A builder method that invokes thesetVgrow
method on the instance being constructed.Applies a function to thevgrowProperty
of 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 theRowConstraints
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
RowConstraints
class
-
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 thesetFillHeight
method on the instance being constructed.- Returns:
- builder instance
-
maxHeight
A builder method that invokes thesetMaxHeight
method on the instance being constructed.- Returns:
- builder instance
-
minHeight
A builder method that invokes thesetMinHeight
method on the instance being constructed.- Returns:
- builder instance
-
percentHeight
A builder method that invokes thesetPercentHeight
method on the instance being constructed.- Returns:
- builder instance
-
prefHeight
A builder method that invokes thesetPrefHeight
method on the instance being constructed.- Returns:
- builder instance
-
valignment
A builder method that invokes thesetValignment
method on the instance being constructed.- Returns:
- builder instance
-
vgrow
A builder method that invokes thesetVgrow
method on the instance being constructed.- Returns:
- builder instance
-
fillHeightPropertyApply
Applies a function to thefillHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
maxHeightPropertyApply
Applies a function to themaxHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
minHeightPropertyApply
Applies a function to theminHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
percentHeightPropertyApply
Applies a function to thepercentHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
prefHeightPropertyApply
Applies a function to theprefHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
valignmentPropertyApply
Applies a function to thevalignmentProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
vgrowPropertyApply
Applies a function to thevgrowProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-