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 theTreeTableViewFocusModel
class.static <S> TreeTableViewTreeTableViewFocusModelBuilder<S>
create
(TreeTableView<S> treeTableView) Accepts the constructor arguments ofTreeTableViewFocusModel(TreeTableView)
and returns an instance ofTreeTableViewTreeTableViewFocusModelBuilder<S>
.Applies a function to thefocusedCellProperty
of the instance being constructed.Applies a function to thefocusedIndexProperty
of the instance being constructed.Applies a function to thefocusedItemProperty
of 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 theTreeTableViewFocusModel
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
TreeTableViewFocusModel
class
-
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 thefocusedCellProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
focusedIndexPropertyApply
public TreeTableViewTreeTableViewFocusModelBuilder<S> focusedIndexPropertyApply(Consumer<ReadOnlyIntegerProperty> op) Applies a function to thefocusedIndexProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
focusedItemPropertyApply
public TreeTableViewTreeTableViewFocusModelBuilder<S> focusedItemPropertyApply(Consumer<ReadOnlyObjectProperty<TreeItem<S>>> op) Applies a function to thefocusedItemProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-