Class TableColumnBuilder<S,T>
TableColumnBuilder class constructs instances of the TableColumn 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 TableColumn constructor
and returns an instance of the TableColumnBuilder.
You can use method chaining to call the builder methods for configuring the TableColumn.
Finally, invoke the build method to generate an instance of the TableColumn 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 TableColumnBuilder<S, T> addColumns(Collection<? extends TableColumn<S, ?>> col) Calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.final TableColumnBuilder<S, T> addColumns(TableColumn<S, ?>... elements) Calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.final TableColumnBuilder<S, T> addStyleClass(String... elements) Calls theaddAllmethod on the ObservableList returned by theTableColumn#getStyleClass()method.final TableColumnBuilder<S, T> addStyleClass(Collection<? extends String> col) Calls theaddAllmethod on the ObservableList returned by theTableColumn#getStyleClass()method.apply(Consumer<TableColumn<S, T>> func) Applies a function to the TableColumn instance being constructed.build()Builds and returns an instance of theTableColumnclass.cellFactory(Callback<TableColumn<S, T>, TableCell<S, T>> value) A builder method that invokes thesetCellFactorymethod on the instance being constructed.Applies a function to thecellFactoryPropertyof the instance being constructed.A builder method that invokes thesetCellValueFactorymethod on the instance being constructed.cellValueFactoryPropertyApply(Consumer<ObjectProperty<Callback<TableColumn.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> TableColumnBuilder <S, T> create()Returns an instance of theTableColumnBuilder<S, T>.static <S,T> TableColumnBuilder <S, T> Accepts the constructor arguments ofTableColumn(String)and returns an instance ofTableColumnBuilder<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.onEditCancel(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCancelmethod on the instance being constructed.onEditCancelPropertyApply(Consumer<ObjectProperty<EventHandler<TableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelPropertyof the instance being constructed.onEditCommit(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCommitmethod on the instance being constructed.onEditCommitPropertyApply(Consumer<ObjectProperty<EventHandler<TableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitPropertyof the instance being constructed.onEditStart(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditStartmethod on the instance being constructed.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(TableColumn.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.Applies a function to thetableViewPropertyof the instance being constructed.A builder method that invokes thesetTextmethod on the instance being constructed.Applies a function to thetextPropertyof 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> TableColumnBuilder <S, T> withColumns(Collection<? extends TableColumn<S, ?>> col) Creates an instance of the builder, then calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.static <S,T> TableColumnBuilder <S, T> withColumns(TableColumn<S, ?>... elements) Creates an instance of the builder, then calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.
-
Method Details
-
create
Returns an instance of theTableColumnBuilder<S, T>.- Returns:
- an instance of the
TableColumnBuilder<S, T>.
-
create
Accepts the constructor arguments ofTableColumn(String)and returns an instance ofTableColumnBuilder<S, T>.- Returns:
- an instance of the
TableColumnBuilder<S, T>.
-
build
Builds and returns an instance of theTableColumnclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
TableColumnclass
-
apply
Applies a function to the TableColumn instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
cellFactory
A builder method that invokes thesetCellFactorymethod on the instance being constructed.- Returns:
- builder instance
-
cellValueFactory
public TableColumnBuilder<S,T> cellValueFactory(Callback<TableColumn.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
A builder method that invokes thesetOnEditCancelmethod on the instance being constructed.- Returns:
- builder instance
-
onEditCommit
A builder method that invokes thesetOnEditCommitmethod on the instance being constructed.- Returns:
- builder instance
-
onEditStart
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 theTableColumn#getColumns()method.- Returns:
- builder instance
-
addColumns
Calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.- Returns:
- builder instance
-
withColumns
Creates an instance of the builder, then calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.- Returns:
- builder instance
-
withColumns
Creates an instance of the builder, then calls theaddAllmethod on the ObservableList returned by theTableColumn#getColumns()method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAllmethod on the ObservableList returned by theTableColumn#getStyleClass()method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAllmethod on the ObservableList returned by theTableColumn#getStyleClass()method.- Returns:
- builder instance
-
cellFactoryPropertyApply
public TableColumnBuilder<S,T> cellFactoryPropertyApply(Consumer<ObjectProperty<Callback<TableColumn<S, T>, TableCell<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 TableColumnBuilder<S,T> cellValueFactoryPropertyApply(Consumer<ObjectProperty<Callback<TableColumn.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
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
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 TableColumnBuilder<S,T> onEditCancelPropertyApply(Consumer<ObjectProperty<EventHandler<TableColumn.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 TableColumnBuilder<S,T> onEditCommitPropertyApply(Consumer<ObjectProperty<EventHandler<TableColumn.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 TableColumnBuilder<S,T> onEditStartPropertyApply(Consumer<ObjectProperty<EventHandler<TableColumn.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 TableColumnBuilder<S,T> parentColumnPropertyApply(Consumer<ReadOnlyObjectProperty<TableColumnBase<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 TableColumnBuilder<S,T> sortTypePropertyApply(Consumer<ObjectProperty<TableColumn.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
-
tableViewPropertyApply
public TableColumnBuilder<S,T> tableViewPropertyApply(Consumer<ReadOnlyObjectProperty<TableView<S>>> op) Applies a function to thetableViewPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.tableViewProperty().bind(anotherProperty)) // Use shorthand form .tableViewPropertyApply(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
-
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
-