Class ComboBoxListViewSkinBuilder<T>
java.lang.Object
io.github.sosuisen.jfxbuilder.controls.ComboBoxListViewSkinBuilder<T>
The
ComboBoxListViewSkinBuilder
class constructs instances of the ComboBoxListViewSkin
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 ComboBoxListViewSkin
constructor
and returns an instance of the ComboBoxListViewSkinBuilder
.
You can use method chaining to call the builder methods for configuring the ComboBoxListViewSkin
.
Finally, invoke the build
method to generate an instance of the ComboBoxListViewSkin
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 TypeMethodDescriptionfinal ComboBoxListViewSkinBuilder
<T> addChildren
(Collection<? extends Node> col) Calls theaddAll
method on the ObservableList returned by theComboBoxListViewSkin#getChildren()
method.final ComboBoxListViewSkinBuilder
<T> addChildren
(Node... elements) Calls theaddAll
method on the ObservableList returned by theComboBoxListViewSkin#getChildren()
method.apply
(Consumer<ComboBoxListViewSkin<T>> func) Applies a function to the ComboBoxListViewSkin instance being constructed.build()
Builds and returns an instance of theComboBoxListViewSkin
class.static <T> ComboBoxListViewSkinBuilder
<T> Accepts the constructor arguments ofComboBoxListViewSkin(ComboBox)
and returns an instance ofComboBoxListViewSkinBuilder<T>
.hideOnClick
(boolean value) A builder method that invokes thesetHideOnClick
method on the instance being constructed.Applies a function to thehideOnClickProperty
of the instance being constructed.
-
Method Details
-
create
Accepts the constructor arguments ofComboBoxListViewSkin(ComboBox)
and returns an instance ofComboBoxListViewSkinBuilder<T>
.- Returns:
- an instance of the
ComboBoxListViewSkinBuilder<T>
.
-
build
Builds and returns an instance of theComboBoxListViewSkin
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
ComboBoxListViewSkin
class
-
apply
Applies a function to the ComboBoxListViewSkin instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
hideOnClick
A builder method that invokes thesetHideOnClick
method on the instance being constructed.- Returns:
- builder instance
-
addChildren
Calls theaddAll
method on the ObservableList returned by theComboBoxListViewSkin#getChildren()
method.- Returns:
- builder instance
-
addChildren
Calls theaddAll
method on the ObservableList returned by theComboBoxListViewSkin#getChildren()
method.- Returns:
- builder instance
-
hideOnClickPropertyApply
Applies a function to thehideOnClickProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.hideOnClickProperty().bind(anotherProperty)) // Use shorthand form .hideOnClickPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-