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 theaddAllmethod on the ObservableList returned by theTreeTableColumn#getColumns()method.final TreeTableColumnBuilder<S, T> addColumns(TreeTableColumn<S, ?>... elements) Calls theaddAllmethod on the ObservableList returned by theTreeTableColumn#getColumns()method.final TreeTableColumnBuilder<S, T> addStyleClass(String... elements) Calls theaddAllmethod on the ObservableList returned by theTreeTableColumn#getStyleClass()method.final TreeTableColumnBuilder<S, T> addStyleClass(Collection<? extends String> col) Calls theaddAllmethod 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 theTreeTableColumnclass.cellFactory(Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>> value) A builder method that invokes thesetCellFactorymethod on the instance being constructed.cellFactoryPropertyApply(Consumer<ObjectProperty<Callback<TreeTableColumn<S, T>, TreeTableCell<S, T>>>> op) Applies a function to thecellFactoryPropertyof the instance being constructed.A builder method that invokes thesetCellValueFactorymethod on the instance being constructed.cellValueFactoryPropertyApply(Consumer<ObjectProperty<Callback<TreeTableColumn.CellDataFeatures<S, T>, ObservableValue<T>>>> op) Applies a function to thecellValueFactoryPropertyof the instance being constructed.comparator(Comparator<T> value) A builder method that invokes thesetComparatormethod on the instance being constructed.Applies a function to thecomparatorPropertyof the instance being constructed.contextMenu(ContextMenu value) A builder method that invokes thesetContextMenumethod on the instance being constructed.Applies a function to thecontextMenuPropertyof 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 thesetEditablemethod on the instance being constructed.Applies a function to theeditablePropertyof the instance being constructed.A builder method that invokes thesetGraphicmethod on the instance being constructed.Applies a function to thegraphicPropertyof the instance being constructed.A builder method that invokes thesetIdmethod on the instance being constructed.Applies a function to theidPropertyof the instance being constructed.maxWidth(double value) A builder method that invokes thesetMaxWidthmethod on the instance being constructed.Applies a function to themaxWidthPropertyof the instance being constructed.minWidth(double value) A builder method that invokes thesetMinWidthmethod on the instance being constructed.Applies a function to theminWidthPropertyof the instance being constructed.A builder method that invokes thesetOnEditCancelmethod on the instance being constructed.onEditCancelPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelPropertyof the instance being constructed.A builder method that invokes thesetOnEditCommitmethod on the instance being constructed.onEditCommitPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitPropertyof the instance being constructed.A builder method that invokes thesetOnEditStartmethod on the instance being constructed.onEditStartPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditStartPropertyof the instance being constructed.Applies a function to theparentColumnPropertyof the instance being constructed.prefWidth(double value) A builder method that invokes thesetPrefWidthmethod on the instance being constructed.Applies a function to theprefWidthPropertyof the instance being constructed.reorderable(boolean value) A builder method that invokes thesetReorderablemethod on the instance being constructed.Applies a function to thereorderablePropertyof the instance being constructed.resizable(boolean value) A builder method that invokes thesetResizablemethod on the instance being constructed.Applies a function to theresizablePropertyof the instance being constructed.sortable(boolean value) A builder method that invokes thesetSortablemethod on the instance being constructed.Applies a function to thesortablePropertyof the instance being constructed.A builder method that invokes thesetSortNodemethod on the instance being constructed.Applies a function to thesortNodePropertyof the instance being constructed.sortType(TreeTableColumn.SortType value) A builder method that invokes thesetSortTypemethod on the instance being constructed.Applies a function to thesortTypePropertyof the instance being constructed.A builder method that invokes thesetStylemethod on the instance being constructed.Applies a function to thestylePropertyof the instance being constructed.A builder method that invokes thesetTextmethod on the instance being constructed.Applies a function to thetextPropertyof the instance being constructed.Applies a function to thetreeTableViewPropertyof the instance being constructed.A builder method that invokes thesetUserDatamethod on the instance being constructed.visible(boolean value) A builder method that invokes thesetVisiblemethod on the instance being constructed.Applies a function to thevisiblePropertyof the instance being constructed.Applies a function to thewidthPropertyof the instance being constructed.static <S,T> TreeTableColumnBuilder <S, T> withColumns(Collection<? extends TreeTableColumn<S, ?>> col) Creates an instance of the builder, then calls theaddAllmethod 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 theaddAllmethod 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 theTreeTableColumnclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
TreeTableColumnclass
-
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 thesetCellFactorymethod 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 thesetCellValueFactorymethod on the instance being constructed.- Returns:
- builder instance
-
comparator
A builder method that invokes thesetComparatormethod on the instance being constructed.- Returns:
- builder instance
-
contextMenu
A builder method that invokes thesetContextMenumethod on the instance being constructed.- Returns:
- builder instance
-
editable
A builder method that invokes thesetEditablemethod on the instance being constructed.- Returns:
- builder instance
-
graphic
A builder method that invokes thesetGraphicmethod on the instance being constructed.- Returns:
- builder instance
-
id
A builder method that invokes thesetIdmethod on the instance being constructed.- Returns:
- builder instance
-
maxWidth
A builder method that invokes thesetMaxWidthmethod on the instance being constructed.- Returns:
- builder instance
-
minWidth
A builder method that invokes thesetMinWidthmethod 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 thesetOnEditCancelmethod 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 thesetOnEditCommitmethod 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 thesetOnEditStartmethod on the instance being constructed.- Returns:
- builder instance
-
prefWidth
A builder method that invokes thesetPrefWidthmethod on the instance being constructed.- Returns:
- builder instance
-
reorderable
A builder method that invokes thesetReorderablemethod on the instance being constructed.- Returns:
- builder instance
-
resizable
A builder method that invokes thesetResizablemethod on the instance being constructed.- Returns:
- builder instance
-
sortNode
A builder method that invokes thesetSortNodemethod on the instance being constructed.- Returns:
- builder instance
-
sortType
A builder method that invokes thesetSortTypemethod on the instance being constructed.- Returns:
- builder instance
-
sortable
A builder method that invokes thesetSortablemethod on the instance being constructed.- Returns:
- builder instance
-
style
A builder method that invokes thesetStylemethod on the instance being constructed.- Returns:
- builder instance
-
text
A builder method that invokes thesetTextmethod on the instance being constructed.- Returns:
- builder instance
-
userData
A builder method that invokes thesetUserDatamethod on the instance being constructed.- Returns:
- builder instance
-
visible
A builder method that invokes thesetVisiblemethod on the instance being constructed.- Returns:
- builder instance
-
addColumns
Calls theaddAllmethod on the ObservableList returned by theTreeTableColumn#getColumns()method.- Returns:
- builder instance
-
addColumns
Calls theaddAllmethod 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 theaddAllmethod 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 theaddAllmethod on the ObservableList returned by theTreeTableColumn#getColumns()method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAllmethod on the ObservableList returned by theTreeTableColumn#getStyleClass()method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAllmethod 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 thecellFactoryPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.cellFactoryProperty().bind(anotherProperty)) // Use shorthand form .cellFactoryPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
cellValueFactoryPropertyApply
public TreeTableColumnBuilder<S,T> cellValueFactoryPropertyApply(Consumer<ObjectProperty<Callback<TreeTableColumn.CellDataFeatures<S, T>, ObservableValue<T>>>> op) Applies a function to thecellValueFactoryPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.cellValueFactoryProperty().bind(anotherProperty)) // Use shorthand form .cellValueFactoryPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
comparatorPropertyApply
public TreeTableColumnBuilder<S,T> comparatorPropertyApply(Consumer<ObjectProperty<Comparator<T>>> op) Applies a function to thecomparatorPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.comparatorProperty().bind(anotherProperty)) // Use shorthand form .comparatorPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
contextMenuPropertyApply
public TreeTableColumnBuilder<S,T> contextMenuPropertyApply(Consumer<ObjectProperty<ContextMenu>> op) Applies a function to thecontextMenuPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.contextMenuProperty().bind(anotherProperty)) // Use shorthand form .contextMenuPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
editablePropertyApply
Applies a function to theeditablePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.editableProperty().bind(anotherProperty)) // Use shorthand form .editablePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
graphicPropertyApply
Applies a function to thegraphicPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.graphicProperty().bind(anotherProperty)) // Use shorthand form .graphicPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
idPropertyApply
Applies a function to theidPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.idProperty().bind(anotherProperty)) // Use shorthand form .idPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
maxWidthPropertyApply
Applies a function to themaxWidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.maxWidthProperty().bind(anotherProperty)) // Use shorthand form .maxWidthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
minWidthPropertyApply
Applies a function to theminWidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.minWidthProperty().bind(anotherProperty)) // Use shorthand form .minWidthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
onEditCancelPropertyApply
public TreeTableColumnBuilder<S,T> onEditCancelPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.onEditCancelProperty().bind(anotherProperty)) // Use shorthand form .onEditCancelPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
onEditCommitPropertyApply
public TreeTableColumnBuilder<S,T> onEditCommitPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.onEditCommitProperty().bind(anotherProperty)) // Use shorthand form .onEditCommitPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
onEditStartPropertyApply
public TreeTableColumnBuilder<S,T> onEditStartPropertyApply(Consumer<ObjectProperty<EventHandler<TreeTableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditStartPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.onEditStartProperty().bind(anotherProperty)) // Use shorthand form .onEditStartPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
parentColumnPropertyApply
public TreeTableColumnBuilder<S,T> parentColumnPropertyApply(Consumer<ReadOnlyObjectProperty<TableColumnBase<TreeItem<S>, ?>>> op) Applies a function to theparentColumnPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.parentColumnProperty().bind(anotherProperty)) // Use shorthand form .parentColumnPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
prefWidthPropertyApply
Applies a function to theprefWidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.prefWidthProperty().bind(anotherProperty)) // Use shorthand form .prefWidthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
reorderablePropertyApply
Applies a function to thereorderablePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.reorderableProperty().bind(anotherProperty)) // Use shorthand form .reorderablePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
resizablePropertyApply
Applies a function to theresizablePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.resizableProperty().bind(anotherProperty)) // Use shorthand form .resizablePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
sortNodePropertyApply
Applies a function to thesortNodePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.sortNodeProperty().bind(anotherProperty)) // Use shorthand form .sortNodePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
sortTypePropertyApply
public TreeTableColumnBuilder<S,T> sortTypePropertyApply(Consumer<ObjectProperty<TreeTableColumn.SortType>> op) Applies a function to thesortTypePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.sortTypeProperty().bind(anotherProperty)) // Use shorthand form .sortTypePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
sortablePropertyApply
Applies a function to thesortablePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.sortableProperty().bind(anotherProperty)) // Use shorthand form .sortablePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
stylePropertyApply
Applies a function to thestylePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.styleProperty().bind(anotherProperty)) // Use shorthand form .stylePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
textPropertyApply
Applies a function to thetextPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.textProperty().bind(anotherProperty)) // Use shorthand form .textPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
treeTableViewPropertyApply
public TreeTableColumnBuilder<S,T> treeTableViewPropertyApply(Consumer<ReadOnlyObjectProperty<TreeTableView<S>>> op) Applies a function to thetreeTableViewPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.treeTableViewProperty().bind(anotherProperty)) // Use shorthand form .treeTableViewPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
visiblePropertyApply
Applies a function to thevisiblePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.visibleProperty().bind(anotherProperty)) // Use shorthand form .visiblePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
widthPropertyApply
Applies a function to thewidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.widthProperty().bind(anotherProperty)) // Use shorthand form .widthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-