S - The type of the objects contained within the TableView items list.T - The type of the content in all cells in this TableColumnpublic class TableColumn2<S,T>
extends javafx.scene.control.TableColumn<S,T>
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(javafx.scene.Node).
This node can be used for displaying a filter editor, a column totalizer or
other purposes.
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);
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
southNode
This property allows the developer to set a node to the south of the header
of this column, where UI can be displayed.
|
| Constructor and Description |
|---|
TableColumn2()
Creates a TableColumn2 control.
|
TableColumn2(java.lang.String text)
Creates a TableColumn2 control with the text set to the provided string
|
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.Node |
getSouthNode()
Gets the value of the property southNode.
|
void |
setSouthNode(javafx.scene.Node value)
Sets the value of the property southNode.
|
javafx.beans.property.ObjectProperty<javafx.scene.Node> |
southNodeProperty()
This property allows the developer to set a node to the south of the header
of this column, where UI can be displayed.
|
cellFactoryProperty, cellValueFactoryProperty, editAnyEvent, editCancelEvent, editCommitEvent, editStartEvent, getCellFactory, getCellObservableValue, getCellObservableValue, getCellValueFactory, getClassCssMetaData, getColumns, getCssMetaData, getOnEditCancel, getOnEditCommit, getOnEditStart, getSortType, getStyleableParent, getTableView, getTypeSelector, impl_styleableGetNode, onEditCancelProperty, onEditCommitProperty, onEditStartProperty, setCellFactory, setCellValueFactory, setOnEditCancel, setOnEditCommit, setOnEditStart, setSortType, sortTypeProperty, tableViewPropertyaddEventHandler, 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, impl_fixedProperty, impl_isFixed, impl_isReorderable, impl_reorderableProperty, impl_setFixed, impl_setReorderable, impl_setWidth, isEditable, isResizable, isSortable, isVisible, maxWidthProperty, minWidthProperty, parentColumnProperty, prefWidthProperty, removeEventHandler, resizableProperty, setComparator, setContextMenu, setEditable, setGraphic, setId, setMaxWidth, setMinWidth, setPrefWidth, setResizable, setSortable, setSortNode, setStyle, setText, setUserData, setVisible, sortableProperty, sortNodeProperty, styleProperty, textProperty, visibleProperty, widthPropertypublic final javafx.beans.property.ObjectProperty<javafx.scene.Node> southNodeProperty
getSouthNode(),
setSouthNode(Node)public TableColumn2()
public TableColumn2(java.lang.String text)
text - The string to show when the TableColumn2 is placed within the
TableView2.public final void setSouthNode(javafx.scene.Node value)
public final javafx.scene.Node getSouthNode()
public final javafx.beans.property.ObjectProperty<javafx.scene.Node> southNodeProperty()
getSouthNode(),
setSouthNode(Node)