Class TreeTableViewTreeTableViewFocusModelBuilder<S>
java.lang.Object
io.github.sosuisen.jfxbuilder.controls.TreeTableViewTreeTableViewFocusModelBuilder<S>
The
TreeTableViewTreeTableViewFocusModelBuilder class constructs instances of the TreeTableViewFocusModel 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 TreeTableViewFocusModel constructor
and returns an instance of the TreeTableViewTreeTableViewFocusModelBuilder.
You can use method chaining to call the builder methods for configuring the TreeTableViewFocusModel.
Finally, invoke the build method to generate an instance of the TreeTableViewFocusModel 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 TypeMethodDescriptionApplies a function to the TreeTableViewFocusModel instance being constructed.build()Builds and returns an instance of theTreeTableViewFocusModelclass.static <S> TreeTableViewTreeTableViewFocusModelBuilder<S> create(TreeTableView<S> treeTableView) Accepts the constructor arguments ofTreeTableViewFocusModel(TreeTableView)and returns an instance ofTreeTableViewTreeTableViewFocusModelBuilder<S>.Applies a function to thefocusedCellPropertyof the instance being constructed.Applies a function to thefocusedIndexPropertyof the instance being constructed.Applies a function to thefocusedItemPropertyof the instance being constructed.
-
Method Details
-
create
public static <S> TreeTableViewTreeTableViewFocusModelBuilder<S> create(TreeTableView<S> treeTableView) Accepts the constructor arguments ofTreeTableViewFocusModel(TreeTableView)and returns an instance ofTreeTableViewTreeTableViewFocusModelBuilder<S>.- Returns:
- an instance of the
TreeTableViewTreeTableViewFocusModelBuilder<S>.
-
build
Builds and returns an instance of theTreeTableViewFocusModelclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
TreeTableViewFocusModelclass
-
apply
public TreeTableViewTreeTableViewFocusModelBuilder<S> apply(Consumer<TreeTableView.TreeTableViewFocusModel<S>> func) Applies a function to the TreeTableViewFocusModel instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
focusedCellPropertyApply
public TreeTableViewTreeTableViewFocusModelBuilder<S> focusedCellPropertyApply(Consumer<ReadOnlyObjectProperty<TreeTablePosition<S, ?>>> op) Applies a function to thefocusedCellPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.focusedCellProperty().bind(anotherProperty)) // Use shorthand form .focusedCellPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
focusedIndexPropertyApply
public TreeTableViewTreeTableViewFocusModelBuilder<S> focusedIndexPropertyApply(Consumer<ReadOnlyIntegerProperty> op) Applies a function to thefocusedIndexPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.focusedIndexProperty().bind(anotherProperty)) // Use shorthand form .focusedIndexPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
focusedItemPropertyApply
public TreeTableViewTreeTableViewFocusModelBuilder<S> focusedItemPropertyApply(Consumer<ReadOnlyObjectProperty<TreeItem<S>>> op) Applies a function to thefocusedItemPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.focusedItemProperty().bind(anotherProperty)) // Use shorthand form .focusedItemPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-