Class TableViewTableViewFocusModelBuilder<S>
java.lang.Object
io.github.sosuisen.jfxbuilder.controls.TableViewTableViewFocusModelBuilder<S>
The
TableViewTableViewFocusModelBuilder
class constructs instances of the TableViewFocusModel
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 TableViewFocusModel
constructor
and returns an instance of the TableViewTableViewFocusModelBuilder
.
You can use method chaining to call the builder methods for configuring the TableViewFocusModel
.
Finally, invoke the build
method to generate an instance of the TableViewFocusModel
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<TableView.TableViewFocusModel<S>> func) Applies a function to the TableViewFocusModel instance being constructed.build()
Builds and returns an instance of theTableViewFocusModel
class.static <S> TableViewTableViewFocusModelBuilder<S>
Accepts the constructor arguments ofTableViewFocusModel(TableView)
and returns an instance ofTableViewTableViewFocusModelBuilder<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
Accepts the constructor arguments ofTableViewFocusModel(TableView)
and returns an instance ofTableViewTableViewFocusModelBuilder<S>
.- Returns:
- an instance of the
TableViewTableViewFocusModelBuilder<S>
.
-
build
Builds and returns an instance of theTableViewFocusModel
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
TableViewFocusModel
class
-
apply
public TableViewTableViewFocusModelBuilder<S> apply(Consumer<TableView.TableViewFocusModel<S>> func) Applies a function to the TableViewFocusModel instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
focusedCellPropertyApply
public TableViewTableViewFocusModelBuilder<S> focusedCellPropertyApply(Consumer<ReadOnlyObjectProperty<TablePosition>> 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 TableViewTableViewFocusModelBuilder<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 TableViewTableViewFocusModelBuilder<S> focusedItemPropertyApply(Consumer<ReadOnlyObjectProperty<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
-