Class TreeTableColumnBuilder<S,T>
TreeTableColumnBuilder
class constructs instances of the TreeTableColumn
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 TreeTableColumn
constructor
and returns an instance of the TreeTableColumnBuilder
.
You can use method chaining to call the builder methods for configuring the TreeTableColumn
.
Finally, invoke the build
method to generate an instance of the TreeTableColumn
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 TreeTableColumnBuilder<S,
T> addColumns
(Collection<? extends TreeTableColumn<S, ?>> col) Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.final TreeTableColumnBuilder<S,
T> addColumns
(TreeTableColumn<S, ?>... elements) Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.final TreeTableColumnBuilder<S,
T> addStyleClass
(String... elements) Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getStyleClass()
method.final TreeTableColumnBuilder<S,
T> addStyleClass
(Collection<? extends String> col) Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getStyleClass()
method.apply
(Consumer<TreeTableColumn<S, T>> func) Applies a function to the TreeTableColumn instance being constructed.build()
Builds and returns an instance of theTreeTableColumn
class.cellFactory
(Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>> value) A builder method that invokes thesetCellFactory
method on the instance being constructed.cellFactoryPropertyApply
(Consumer<ObjectProperty<Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>>>> op) Applies a function to thecellFactoryProperty
of the instance being constructed.A builder method that invokes thesetCellValueFactory
method on the instance being constructed.cellValueFactoryPropertyApply
(Consumer<ObjectProperty<Callback<TreeTableColumn.CellDataFeatures<S, T>, ObservableValue<T>>>> op) Applies a function to thecellValueFactoryProperty
of the instance being constructed.comparator
(Comparator<T> value) A builder method that invokes thesetComparator
method on the instance being constructed.Applies a function to thecomparatorProperty
of the instance being constructed.contextMenu
(ContextMenu value) A builder method that invokes thesetContextMenu
method on the instance being constructed.Applies a function to thecontextMenuProperty
of the instance being constructed.static <S,
T> TreeTableColumnBuilder<S, T> create()
Returns an instance of theTreeTableColumnBuilder<S, T>
.static <S,
T> TreeTableColumnBuilder<S, T> Accepts the constructor arguments ofTreeTableColumn(String)
and returns an instance ofTreeTableColumnBuilder<S, T>
.editable
(boolean value) A builder method that invokes thesetEditable
method on the instance being constructed.Applies a function to theeditableProperty
of the instance being constructed.A builder method that invokes thesetGraphic
method on the instance being constructed.Applies a function to thegraphicProperty
of the instance being constructed.A builder method that invokes thesetId
method on the instance being constructed.Applies a function to theidProperty
of the instance being constructed.maxWidth
(double value) A builder method that invokes thesetMaxWidth
method on the instance being constructed.Applies a function to themaxWidthProperty
of the instance being constructed.minWidth
(double value) A builder method that invokes thesetMinWidth
method on the instance being constructed.Applies a function to theminWidthProperty
of the instance being constructed.A builder method that invokes thesetOnEditCancel
method on the instance being constructed.onEditCancelPropertyApply
(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelProperty
of the instance being constructed.A builder method that invokes thesetOnEditCommit
method on the instance being constructed.onEditCommitPropertyApply
(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitProperty
of the instance being constructed.A builder method that invokes thesetOnEditStart
method on the instance being constructed.onEditStartPropertyApply
(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditStartProperty
of the instance being constructed.Applies a function to theparentColumnProperty
of the instance being constructed.prefWidth
(double value) A builder method that invokes thesetPrefWidth
method on the instance being constructed.Applies a function to theprefWidthProperty
of the instance being constructed.reorderable
(boolean value) A builder method that invokes thesetReorderable
method on the instance being constructed.Applies a function to thereorderableProperty
of the instance being constructed.resizable
(boolean value) A builder method that invokes thesetResizable
method on the instance being constructed.Applies a function to theresizableProperty
of the instance being constructed.sortable
(boolean value) A builder method that invokes thesetSortable
method on the instance being constructed.Applies a function to thesortableProperty
of the instance being constructed.A builder method that invokes thesetSortNode
method on the instance being constructed.Applies a function to thesortNodeProperty
of the instance being constructed.sortType
(TreeTableColumn.SortType value) A builder method that invokes thesetSortType
method on the instance being constructed.Applies a function to thesortTypeProperty
of the instance being constructed.A builder method that invokes thesetStyle
method on the instance being constructed.Applies a function to thestyleProperty
of the instance being constructed.A builder method that invokes thesetText
method on the instance being constructed.Applies a function to thetextProperty
of the instance being constructed.Applies a function to thetreeTableViewProperty
of the instance being constructed.A builder method that invokes thesetUserData
method on the instance being constructed.visible
(boolean value) A builder method that invokes thesetVisible
method on the instance being constructed.Applies a function to thevisibleProperty
of the instance being constructed.Applies a function to thewidthProperty
of the instance being constructed.static <S,
T> TreeTableColumnBuilder<S, T> withColumns
(Collection<? extends TreeTableColumn<S, ?>> col) Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.static <S,
T> TreeTableColumnBuilder<S, T> withColumns
(TreeTableColumn<S, ?>... elements) Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.
-
Method Details
-
create
Returns an instance of theTreeTableColumnBuilder<S, T>
.- Returns:
- an instance of the
TreeTableColumnBuilder<S, T>
.
-
create
Accepts the constructor arguments ofTreeTableColumn(String)
and returns an instance ofTreeTableColumnBuilder<S, T>
.- Returns:
- an instance of the
TreeTableColumnBuilder<S, T>
.
-
build
Builds and returns an instance of theTreeTableColumn
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
TreeTableColumn
class
-
apply
Applies a function to the TreeTableColumn instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
cellFactory
public TreeTableColumnBuilder<S,T> cellFactory(Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>> value) A builder method that invokes thesetCellFactory
method on the instance being constructed.- Returns:
- builder instance
-
cellValueFactory
public TreeTableColumnBuilder<S,T> cellValueFactory(Callback<TreeTableColumn.CellDataFeatures<S, T>, ObservableValue<T>> value) A builder method that invokes thesetCellValueFactory
method on the instance being constructed.- Returns:
- builder instance
-
comparator
A builder method that invokes thesetComparator
method on the instance being constructed.- Returns:
- builder instance
-
contextMenu
A builder method that invokes thesetContextMenu
method on the instance being constructed.- Returns:
- builder instance
-
editable
A builder method that invokes thesetEditable
method on the instance being constructed.- Returns:
- builder instance
-
graphic
A builder method that invokes thesetGraphic
method on the instance being constructed.- Returns:
- builder instance
-
id
A builder method that invokes thesetId
method on the instance being constructed.- Returns:
- builder instance
-
maxWidth
A builder method that invokes thesetMaxWidth
method on the instance being constructed.- Returns:
- builder instance
-
minWidth
A builder method that invokes thesetMinWidth
method on the instance being constructed.- Returns:
- builder instance
-
onEditCancel
public TreeTableColumnBuilder<S,T> onEditCancel(EventHandler<TreeTableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCancel
method on the instance being constructed.- Returns:
- builder instance
-
onEditCommit
public TreeTableColumnBuilder<S,T> onEditCommit(EventHandler<TreeTableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCommit
method on the instance being constructed.- Returns:
- builder instance
-
onEditStart
public TreeTableColumnBuilder<S,T> onEditStart(EventHandler<TreeTableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditStart
method on the instance being constructed.- Returns:
- builder instance
-
prefWidth
A builder method that invokes thesetPrefWidth
method on the instance being constructed.- Returns:
- builder instance
-
reorderable
A builder method that invokes thesetReorderable
method on the instance being constructed.- Returns:
- builder instance
-
resizable
A builder method that invokes thesetResizable
method on the instance being constructed.- Returns:
- builder instance
-
sortNode
A builder method that invokes thesetSortNode
method on the instance being constructed.- Returns:
- builder instance
-
sortType
A builder method that invokes thesetSortType
method on the instance being constructed.- Returns:
- builder instance
-
sortable
A builder method that invokes thesetSortable
method on the instance being constructed.- Returns:
- builder instance
-
style
A builder method that invokes thesetStyle
method on the instance being constructed.- Returns:
- builder instance
-
text
A builder method that invokes thesetText
method on the instance being constructed.- Returns:
- builder instance
-
userData
A builder method that invokes thesetUserData
method on the instance being constructed.- Returns:
- builder instance
-
visible
A builder method that invokes thesetVisible
method on the instance being constructed.- Returns:
- builder instance
-
addColumns
Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.- Returns:
- builder instance
-
addColumns
Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.- Returns:
- builder instance
-
withColumns
@SafeVarargs public static <S,T> TreeTableColumnBuilder<S,T> withColumns(TreeTableColumn<S, ?>... elements) Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.- Returns:
- builder instance
-
withColumns
public static <S,T> TreeTableColumnBuilder<S,T> withColumns(Collection<? extends TreeTableColumn<S, ?>> col) Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getColumns()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getStyleClass()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTreeTableColumn#getStyleClass()
method.- Returns:
- builder instance
-
cellFactoryPropertyApply
public TreeTableColumnBuilder<S,T> cellFactoryPropertyApply(Consumer<ObjectProperty<Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>>>> op) Applies a function to thecellFactoryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
cellValueFactoryPropertyApply
public TreeTableColumnBuilder<S,T> cellValueFactoryPropertyApply(Consumer<ObjectProperty<Callback<TreeTableColumn.CellDataFeatures<S, T>, ObservableValue<T>>>> op) Applies a function to thecellValueFactoryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
comparatorPropertyApply
public TreeTableColumnBuilder<S,T> comparatorPropertyApply(Consumer<ObjectProperty<Comparator<T>>> op) Applies a function to thecomparatorProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
contextMenuPropertyApply
public TreeTableColumnBuilder<S,T> contextMenuPropertyApply(Consumer<ObjectProperty<ContextMenu>> op) Applies a function to thecontextMenuProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
editablePropertyApply
Applies a function to theeditableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
graphicPropertyApply
Applies a function to thegraphicProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
idPropertyApply
Applies a function to theidProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
maxWidthPropertyApply
Applies a function to themaxWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
minWidthPropertyApply
Applies a function to theminWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onEditCancelPropertyApply
public TreeTableColumnBuilder<S,T> onEditCancelPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onEditCommitPropertyApply
public TreeTableColumnBuilder<S,T> onEditCommitPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onEditStartPropertyApply
public TreeTableColumnBuilder<S,T> onEditStartPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditStartProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
parentColumnPropertyApply
public TreeTableColumnBuilder<S,T> parentColumnPropertyApply(Consumer<ReadOnlyObjectProperty<TableColumnBase<TreeItem<S>, ?>>> op) Applies a function to theparentColumnProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
prefWidthPropertyApply
Applies a function to theprefWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
reorderablePropertyApply
Applies a function to thereorderableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
resizablePropertyApply
Applies a function to theresizableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
sortNodePropertyApply
Applies a function to thesortNodeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
sortTypePropertyApply
public TreeTableColumnBuilder<S,T> sortTypePropertyApply(Consumer<ObjectProperty<TreeTableColumn.SortType>> op) Applies a function to thesortTypeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
sortablePropertyApply
Applies a function to thesortableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
stylePropertyApply
Applies a function to thestyleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
textPropertyApply
Applies a function to thetextProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
treeTableViewPropertyApply
public TreeTableColumnBuilder<S,T> treeTableViewPropertyApply(Consumer<ReadOnlyObjectProperty<TreeTableView<S>>> op) Applies a function to thetreeTableViewProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
visiblePropertyApply
Applies a function to thevisibleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
widthPropertyApply
Applies a function to thewidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-