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 theaddAllmethod on the ObservableList returned by theComboBoxListViewSkin#getChildren()method.final ComboBoxListViewSkinBuilder<T> addChildren(Node... elements) Calls theaddAllmethod 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 theComboBoxListViewSkinclass.static <T> ComboBoxListViewSkinBuilder<T> Accepts the constructor arguments ofComboBoxListViewSkin(ComboBox)and returns an instance ofComboBoxListViewSkinBuilder<T>.hideOnClick(boolean value) A builder method that invokes thesetHideOnClickmethod on the instance being constructed.Applies a function to thehideOnClickPropertyof 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 theComboBoxListViewSkinclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
ComboBoxListViewSkinclass
-
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 thesetHideOnClickmethod on the instance being constructed.- Returns:
- builder instance
-
addChildren
Calls theaddAllmethod on the ObservableList returned by theComboBoxListViewSkin#getChildren()method.- Returns:
- builder instance
-
addChildren
Calls theaddAllmethod on the ObservableList returned by theComboBoxListViewSkin#getChildren()method.- Returns:
- builder instance
-
hideOnClickPropertyApply
Applies a function to thehideOnClickPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.hideOnClickProperty().bind(anotherProperty)) // Use shorthand form .hideOnClickPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-