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 theaddAll
method on the ObservableList returned by theTableColumn#getColumns()
method.final TableColumnBuilder
<S, T> addColumns
(TableColumn<S, ?>... elements) Calls theaddAll
method on the ObservableList returned by theTableColumn#getColumns()
method.final TableColumnBuilder
<S, T> addStyleClass
(String... elements) Calls theaddAll
method on the ObservableList returned by theTableColumn#getStyleClass()
method.final TableColumnBuilder
<S, T> addStyleClass
(Collection<? extends String> col) Calls theaddAll
method 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 theTableColumn
class.cellFactory
(Callback<TableColumn<S, T>, TableCell<S, T>> value) A builder method that invokes thesetCellFactory
method on the instance being constructed.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<TableColumn.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> 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 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.onEditCancel
(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCancel
method on the instance being constructed.onEditCancelPropertyApply
(Consumer<ObjectProperty<EventHandler<TableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCancelProperty
of the instance being constructed.onEditCommit
(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditCommit
method on the instance being constructed.onEditCommitPropertyApply
(Consumer<ObjectProperty<EventHandler<TableColumn.CellEditEvent<S, T>>>> op) Applies a function to theonEditCommitProperty
of the instance being constructed.onEditStart
(EventHandler<TableColumn.CellEditEvent<S, T>> value) A builder method that invokes thesetOnEditStart
method on the instance being constructed.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
(TableColumn.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.Applies a function to thetableViewProperty
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.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> TableColumnBuilder <S, T> withColumns
(Collection<? extends TableColumn<S, ?>> col) Creates an instance of the builder, then calls theaddAll
method 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 theaddAll
method 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 theTableColumn
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
TableColumn
class
-
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 thesetCellFactory
method 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 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
A builder method that invokes thesetOnEditCancel
method on the instance being constructed.- Returns:
- builder instance
-
onEditCommit
A builder method that invokes thesetOnEditCommit
method on the instance being constructed.- Returns:
- builder instance
-
onEditStart
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 theTableColumn#getColumns()
method.- Returns:
- builder instance
-
addColumns
Calls theaddAll
method on the ObservableList returned by theTableColumn#getColumns()
method.- Returns:
- builder instance
-
withColumns
Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTableColumn#getColumns()
method.- Returns:
- builder instance
-
withColumns
Creates an instance of the builder, then calls theaddAll
method on the ObservableList returned by theTableColumn#getColumns()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTableColumn#getStyleClass()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method 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 thecellFactoryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thecellValueFactoryProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thecomparatorProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thecontextMenuProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theeditableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thegraphicProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theidProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 themaxWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theminWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theonEditCancelProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theonEditCommitProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theonEditStartProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theparentColumnProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theprefWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thereorderableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 theresizableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thesortNodeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thesortTypeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thesortableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thestyleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thetableViewProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thetextProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thevisibleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.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 thewidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.widthProperty().bind(anotherProperty)) // Use shorthand form .widthPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-