java.lang.Object
javafx.scene.control.TableColumnBase<S,T>
javafx.scene.control.TableColumn<S,T>
org.controlsfx.control.tableview2.TableColumn2<S,T>
- Type Parameters:
S- The type of the objects contained within the TableView items list.T- The type of the content in all cells in this TableColumn
- All Implemented Interfaces:
Styleable,EventTarget
- Direct Known Subclasses:
FilteredTableColumn
An extension of
TableColumn that allows adding a South Header Node.
The south header is an extended region below the regular column header, and where
a node can be laid out with setSouthNode(Node).
This node can be used for displaying a filter editor, a column totalizer or
other purposes.
Sample
The following code snippet creates a column and adds a label as south node that will display the occurrences of the text "1" in the column:
TableColumn2<Person,String> firstNameCol = new TableColumn2<>("First Name");
firstNameCol.setCellValueFactory(p -> p.getValue().firstNameProperty());
firstName.setCellFactory(TextField2TableCell.forTableColumn());
Label labelFirstName = new Label();
labelFirstName.textProperty().bind(Bindings.createStringBinding(() ->
"#1: " + table.getItems().stream()
.filter(t -> t.getFirstName()
.contains("1"))
.count(), table.getItems()));
firstName.setSouthNode(labelFirstName);
-
Property Summary
PropertiesTypePropertyDescriptionfinal ObjectProperty<Node>This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.Properties inherited from class javafx.scene.control.TableColumn
cellFactory, cellValueFactory, onEditCancel, onEditCommit, onEditStart, sortType, tableViewProperties inherited from class javafx.scene.control.TableColumnBase
comparator, contextMenu, editable, graphic, id, maxWidth, minWidth, parentColumn, prefWidth, reorderable, resizable, sortable, sortNode, style, text, visible, width -
Nested Class Summary
Nested classes/interfaces inherited from class javafx.scene.control.TableColumn
TableColumn.CellDataFeatures<S extends Object,T extends Object>, TableColumn.CellEditEvent<S extends Object, T extends Object>, TableColumn.SortType -
Field Summary
Fields inherited from class javafx.scene.control.TableColumn
DEFAULT_CELL_FACTORYFields inherited from class javafx.scene.control.TableColumnBase
DEFAULT_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionCreates a TableColumn2 control.TableColumn2(String text) Creates a TableColumn2 control with the text set to the provided string -
Method Summary
Modifier and TypeMethodDescriptionfinal NodeGets the value of the property southNode.final voidsetSouthNode(Node value) Sets the value of the property southNode.final ObjectProperty<Node>This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.Methods inherited from class javafx.scene.control.TableColumn
cellFactoryProperty, cellValueFactoryProperty, editAnyEvent, editCancelEvent, editCommitEvent, editStartEvent, getCellFactory, getCellObservableValue, getCellObservableValue, getCellValueFactory, getClassCssMetaData, getColumns, getCssMetaData, getOnEditCancel, getOnEditCommit, getOnEditStart, getSortType, getStyleableNode, getStyleableParent, getTableView, getTypeSelector, onEditCancelProperty, onEditCommitProperty, onEditStartProperty, setCellFactory, setCellValueFactory, setOnEditCancel, setOnEditCommit, setOnEditStart, setSortType, sortTypeProperty, tableViewPropertyMethods inherited from class javafx.scene.control.TableColumnBase
addEventHandler, buildEventDispatchChain, comparatorProperty, contextMenuProperty, editableProperty, getCellData, getCellData, getComparator, getContextMenu, getGraphic, getId, getMaxWidth, getMinWidth, getParentColumn, getPrefWidth, getProperties, getPseudoClassStates, getSortNode, getStyle, getStyleClass, getText, getUserData, getWidth, graphicProperty, hasProperties, idProperty, isEditable, isReorderable, isResizable, isSortable, isVisible, maxWidthProperty, minWidthProperty, parentColumnProperty, prefWidthProperty, removeEventHandler, reorderableProperty, resizableProperty, setComparator, setContextMenu, setEditable, setGraphic, setId, setMaxWidth, setMinWidth, setPrefWidth, setReorderable, setResizable, setSortable, setSortNode, setStyle, setText, setUserData, setVisible, sortableProperty, sortNodeProperty, styleProperty, textProperty, visibleProperty, widthPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.event.EventTarget
buildEventDispatchChain
-
Property Details
-
southNode
This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.- See Also:
-
-
Constructor Details
-
TableColumn2
public TableColumn2()Creates a TableColumn2 control. -
TableColumn2
Creates a TableColumn2 control with the text set to the provided string- Parameters:
text- The string to show when the TableColumn2 is placed within the TableView2.
-
-
Method Details
-
setSouthNode
Sets the value of the property southNode.- Property description:
- This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
-
getSouthNode
Gets the value of the property southNode.- Property description:
- This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.
-
southNodeProperty
This property allows the developer to set a node to the south of the header of this column, where UI can be displayed.- See Also:
-