Class ColumnConstraintsBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ColumnConstraintsBuilder
The
ColumnConstraintsBuilder
class constructs instances of the ColumnConstraints
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 ColumnConstraints
constructor
and returns an instance of the ColumnConstraintsBuilder
.
You can use method chaining to call the builder methods for configuring the ColumnConstraints
.
Finally, invoke the build
method to generate an instance of the ColumnConstraints
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<ColumnConstraints> func) Applies a function to the ColumnConstraints instance being constructed.build()
Builds and returns an instance of theColumnConstraints
class.static ColumnConstraintsBuilder
create()
Returns an instance of theColumnConstraintsBuilder
.static ColumnConstraintsBuilder
create
(double width) Accepts the constructor arguments ofColumnConstraints(double)
and returns an instance ofColumnConstraintsBuilder
.static ColumnConstraintsBuilder
create
(double minWidth, double prefWidth, double maxWidth) Accepts the constructor arguments ofColumnConstraints(double, double, double)
and returns an instance ofColumnConstraintsBuilder
.static ColumnConstraintsBuilder
create
(double minWidth, double prefWidth, double maxWidth, Priority hgrow, HPos halignment, boolean fillWidth) Accepts the constructor arguments ofColumnConstraints(double, double, double, Priority, HPos, boolean)
and returns an instance ofColumnConstraintsBuilder
.fillWidth
(boolean value) A builder method that invokes thesetFillWidth
method on the instance being constructed.Applies a function to thefillWidthProperty
of the instance being constructed.halignment
(HPos value) A builder method that invokes thesetHalignment
method on the instance being constructed.Applies a function to thehalignmentProperty
of the instance being constructed.A builder method that invokes thesetHgrow
method on the instance being constructed.Applies a function to thehgrowProperty
of the instance being constructed.maxWidth
(double value) A builder method that invokes thesetMaxWidth
method on the instance being constructed.Applies a function to themaxWidthProperty
of the instance being constructed.minWidth
(double value) A builder method that invokes thesetMinWidth
method on the instance being constructed.Applies a function to theminWidthProperty
of the instance being constructed.percentWidth
(double value) A builder method that invokes thesetPercentWidth
method on the instance being constructed.Applies a function to thepercentWidthProperty
of the instance being constructed.prefWidth
(double value) A builder method that invokes thesetPrefWidth
method on the instance being constructed.Applies a function to theprefWidthProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theColumnConstraintsBuilder
.- Returns:
- an instance of the
ColumnConstraintsBuilder
.
-
create
Accepts the constructor arguments ofColumnConstraints(double)
and returns an instance ofColumnConstraintsBuilder
.- Returns:
- an instance of the
ColumnConstraintsBuilder
.
-
create
Accepts the constructor arguments ofColumnConstraints(double, double, double)
and returns an instance ofColumnConstraintsBuilder
.- Returns:
- an instance of the
ColumnConstraintsBuilder
.
-
create
public static ColumnConstraintsBuilder create(double minWidth, double prefWidth, double maxWidth, Priority hgrow, HPos halignment, boolean fillWidth) Accepts the constructor arguments ofColumnConstraints(double, double, double, Priority, HPos, boolean)
and returns an instance ofColumnConstraintsBuilder
.- Returns:
- an instance of the
ColumnConstraintsBuilder
.
-
build
Builds and returns an instance of theColumnConstraints
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
ColumnConstraints
class
-
apply
Applies a function to the ColumnConstraints instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
fillWidth
A builder method that invokes thesetFillWidth
method on the instance being constructed.- Returns:
- builder instance
-
halignment
A builder method that invokes thesetHalignment
method on the instance being constructed.- Returns:
- builder instance
-
hgrow
A builder method that invokes thesetHgrow
method on the instance being constructed.- Returns:
- builder instance
-
maxWidth
A builder method that invokes thesetMaxWidth
method on the instance being constructed.- Returns:
- builder instance
-
minWidth
A builder method that invokes thesetMinWidth
method on the instance being constructed.- Returns:
- builder instance
-
percentWidth
A builder method that invokes thesetPercentWidth
method on the instance being constructed.- Returns:
- builder instance
-
prefWidth
A builder method that invokes thesetPrefWidth
method on the instance being constructed.- Returns:
- builder instance
-
fillWidthPropertyApply
Applies a function to thefillWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
halignmentPropertyApply
Applies a function to thehalignmentProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
hgrowPropertyApply
Applies a function to thehgrowProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
maxWidthPropertyApply
Applies a function to themaxWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
minWidthPropertyApply
Applies a function to theminWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
percentWidthPropertyApply
Applies a function to thepercentWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
prefWidthPropertyApply
Applies a function to theprefWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-