java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
javafx.scene.control.TableView<S>
org.controlsfx.control.tableview2.TableView2<S>
- Type Parameters:
S
- The type of the objects contained within the TableView2 items list.
- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
,javafx.scene.control.Skinnable
- Direct Known Subclasses:
FilteredTableView
public class TableView2<S>
extends javafx.scene.control.TableView<S>
The TableView2 is an advanced JavaFX
Rows and columns can be fixed using dedicated actions like
You have also the possibility to fix them manually by adding and removing items from
If you want to fix several rows or columns together, you can call
You have also the possibility to deactivate these features.
You can also access and toggle row header's visibility by using the method provided
Two specialized cell factories are available
While filtering can be implemented as in a regular JavaFX TableView control, see
Cell spanning is not supported yet.
TableView
control, that can
be used as drop-in replacement control for the existing TableView, and provides
different functionalities and use cases.
Features
- Rows can be fixed to the top of the
TableView2
so that they are always visible on screen. - Columns can be fixed to the left of the
TableView2
so that they are always visible on screen. - A row header can be switched on in order to display any custom content.
- The column header can be extended to provide custom content.
FilteredTableView
is a subclass of TableView2 with extended filtering options
Fixing Rows and Columns
Rows and columns can be fixed using dedicated actions like
ColumnFixAction
and RowFixAction
. When fixed, the header's
background will show a darker color. For instance, these actions can be
attached to a ContextMenu
that can be installed to the row header cells
with rowHeaderContextMenuFactory
.
You have also the possibility to fix them manually by adding and removing items from
getFixedRows()
and getFixedColumns()
. But you
are strongly advised to check if it's possible to do so with
isColumnFixable(int)
for the fixed columns and with
isRowFixable(int)
for the fixed rows.
If you want to fix several rows or columns together, you can call
areRowsFixable(List)
or
areTableViewColumnsFixable(List)
to verify if you can fix them.
Calling those methods prior every move will ensure that no exception will be thrown.
You have also the possibility to deactivate these features.
Row Headers
You can also access and toggle row header's visibility by using the method provided
setRowHeaderVisible(boolean)
.
By default the row header will show the row index, but you can set the content
with setRowHeader(TableColumn)
.
Cell editing
Two specialized cell factories are available
TextField2TableCell
and
ComboBox2TableCell
, providing support for commit on focus lost.
Filtering options
While filtering can be implemented as in a regular JavaFX TableView control, see
FilteredTableView
for extended filtering options.
Features not supported
Cell spanning is not supported yet.
Sample
Let's provide the underlying data model, based on a Person
class.
public class Person {
private StringProperty firstName;
public void setFirstName(String value) { firstNameProperty().set(value); }
public String getFirstName() { return firstNameProperty().get(); }
public StringProperty firstNameProperty() {
if (firstName == null) firstName = new SimpleStringProperty(this, "firstName");
return firstName;
}
private StringProperty lastName;
public void setLastName(String value) { lastNameProperty().set(value); }
public String getLastName() { return lastNameProperty().get(); }
public StringProperty lastNameProperty() {
if (lastName == null) lastName = new SimpleStringProperty(this, "lastName");
return lastName;
}
}
A TableView2 can be created, and filled with an observable list of people:
TableView2<Person> table = new TableView2<Person>();
ObservableList<Person> people = getPeople();
table.setItems(people);
Now we add two columns
to the table:
TableColumn2<Person,String> firstNameCol = new TableColumn2<>("First Name");
firstNameCol.setCellValueFactory(p -> p.getValue().firstNameProperty());
TableColumn2<Person,String> lastNameCol = new TableColumn2<>("Last Name");
lastNameCol.setCellValueFactory(p -> p.getValue().lastNameProperty());
table.getColumns().setAll(firstNameCol, lastNameCol);
A cell factory that allows commit on focus lost can be set:
firstName.setCellFactory(TextField2TableCell.forTableColumn());
We can fix some row and columns, and also show the row header:
table.getFixedColumns().setAll(firstNameColumn);
table.getFixedRows().setAll(0, 1, 2);
table.setRowHeaderVisible(true);
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ReadOnlyBooleanProperty
Return the Boolean property associated with the allowance of fixing or unfixing some columns.final javafx.beans.property.ReadOnlyBooleanProperty
Return the Boolean property associated with the allowance of fixing or unfixing some rows.final javafx.beans.property.ObjectProperty
<BiFunction<Integer, S, javafx.scene.control.ContextMenu>> An object property of aBiFunction
that can be used to define the context menu of each row of the row header.final javafx.beans.property.ObjectProperty
<javafx.scene.control.TableColumn<S, ?>> The row header property wraps aTableColumn
that can be used to render the row header.final javafx.beans.property.BooleanProperty
BooleanProperty associated with the row Header.final javafx.beans.property.DoubleProperty
This DoubleProperty represents the with of the rowHeader.final javafx.beans.property.BooleanProperty
This property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.Properties inherited from class javafx.scene.control.TableView
columnResizePolicy, comparator, editable, editingCell, fixedCellSize, focusModel, items, onScrollToColumn, onScrollTo, onSort, placeholder, rowFactory, selectionModel, sortPolicy, tableMenuButtonVisible
Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The SpanType describes in which state each cell can be.Nested classes/interfaces inherited from class javafx.scene.control.TableView
javafx.scene.control.TableView.ResizeFeatures<S>, javafx.scene.control.TableView.TableViewFocusModel<S>, javafx.scene.control.TableView.TableViewSelectionModel<S>
-
Field Summary
Fields inherited from class javafx.scene.control.TableView
CONSTRAINED_RESIZE_POLICY, DEFAULT_SORT_POLICY, UNCONSTRAINED_RESIZE_POLICY
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a TableView2 control with no content.TableView2
(javafx.collections.ObservableList<S> items) Creates a TableView2 with the content provided in the items ObservableList. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
areRowsFixable
(List<? extends Integer> list) Indicates whether a List of rows can be fixed or not.final javafx.beans.property.ReadOnlyBooleanProperty
Return the Boolean property associated with the allowance of fixing or unfixing some columns.protected javafx.scene.control.Skin
<?> int
getColumnSpan
(javafx.scene.control.TablePosition<?, ?> pos) Return the current column span.final javafx.collections.ObservableList
<javafx.scene.control.TableColumn> You can fix or unfix a column by modifying this list.final javafx.collections.ObservableList
<Integer> You can fix or unfix a row by modifying this list.final javafx.scene.control.TableColumn
<S, ?> Gets the value of therowHeader
property.final BiFunction
<Integer, S, javafx.scene.control.ContextMenu> Gets the value of therowHeaderContextMenuFactory
property.final double
int
getRowSpan
(javafx.scene.control.TablePosition<?, ?> pos, int index) Return the current row span at the given position in the Table.getSpanType
(int rowIndex, int modelColumn) Return theTableView2.SpanType
of a cell.final boolean
isColumnFixable
(int columnIndex) Indicate whether this column can be fixed or not.final boolean
Return whether changes to Fixed columns are enabled.final boolean
isRowFixable
(int row) Indicate whether a row can be fixed or not.final boolean
Return whether changes to Fixed rows are enabled.final boolean
Return if the row header is showing.final boolean
Gets the value of thesouthHeaderBlended
property.final javafx.beans.property.ReadOnlyBooleanProperty
Return the Boolean property associated with the allowance of fixing or unfixing some rows.final javafx.beans.property.ObjectProperty
<BiFunction<Integer, S, javafx.scene.control.ContextMenu>> An object property of aBiFunction
that can be used to define the context menu of each row of the row header.final javafx.beans.property.ObjectProperty
<javafx.scene.control.TableColumn<S, ?>> The row header property wraps aTableColumn
that can be used to render the row header.final javafx.beans.property.BooleanProperty
BooleanProperty associated with the row Header.final javafx.beans.property.DoubleProperty
This DoubleProperty represents the with of the rowHeader.final void
setColumnFixingEnabled
(boolean b) If set to true, user will be allowed to fix and unfix the columns.final void
setRowFixingEnabled
(boolean b) If set to true, user will be allowed to fix and unfix the rows.final void
setRowHeader
(javafx.scene.control.TableColumn<S, ?> value) Sets the value of therowHeader
property.final void
setRowHeaderContextMenuFactory
(BiFunction<Integer, S, javafx.scene.control.ContextMenu> value) Sets the value of therowHeaderContextMenuFactory
property.final void
setRowHeaderVisible
(boolean b) Activate and deactivate the row header.final void
setRowHeaderWidth
(double value) Specify a new width for the row header.final void
setSouthHeaderBlended
(boolean value) Sets the value of thesouthHeaderBlended
property.void
sort()
OverridesTableView.sort()
in order to fire custom sort events when sorting starts and finishes.final javafx.beans.property.BooleanProperty
This property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.Methods inherited from class javafx.scene.control.TableView
columnResizePolicyProperty, comparatorProperty, edit, editableProperty, editingCellProperty, fixedCellSizeProperty, focusModelProperty, getClassCssMetaData, getColumnResizePolicy, getColumns, getComparator, getControlCssMetaData, getEditingCell, getFixedCellSize, getFocusModel, getItems, getOnScrollTo, getOnScrollToColumn, getOnSort, getPlaceholder, getRowFactory, getSelectionModel, getSortOrder, getSortPolicy, getVisibleLeafColumn, getVisibleLeafColumns, getVisibleLeafIndex, isEditable, isTableMenuButtonVisible, itemsProperty, onScrollToColumnProperty, onScrollToProperty, onSortProperty, placeholderProperty, queryAccessibleAttribute, refresh, resizeColumn, rowFactoryProperty, scrollTo, scrollTo, scrollToColumn, scrollToColumnIndex, selectionModelProperty, setColumnResizePolicy, setEditable, setFixedCellSize, setFocusModel, setItems, setOnScrollTo, setOnScrollToColumn, setOnSort, setPlaceholder, setRowFactory, setSelectionModel, setSortPolicy, setTableMenuButtonVisible, sortPolicyProperty, tableMenuButtonVisibleProperty
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
rowFixingEnabled
public final javafx.beans.property.ReadOnlyBooleanProperty rowFixingEnabledPropertyReturn the Boolean property associated with the allowance of fixing or unfixing some rows.- See Also:
-
columnFixingEnabled
public final javafx.beans.property.ReadOnlyBooleanProperty columnFixingEnabledPropertyReturn the Boolean property associated with the allowance of fixing or unfixing some columns.- See Also:
-
rowHeaderVisible
public final javafx.beans.property.BooleanProperty rowHeaderVisiblePropertyBooleanProperty associated with the row Header.- See Also:
-
rowHeaderWidth
public final javafx.beans.property.DoubleProperty rowHeaderWidthPropertyThis DoubleProperty represents the with of the rowHeader. This is just representing the width of the Labels.- See Also:
-
rowHeader
public final javafx.beans.property.ObjectProperty<javafx.scene.control.TableColumn<S,?>> rowHeaderPropertyThe row header property wraps aTableColumn
that can be used to render the row header. By default, if this property is not set, a TableColumn will be used to render the number of row, starting from 1.- See Also:
-
rowHeaderContextMenuFactory
public final javafx.beans.property.ObjectProperty<BiFunction<Integer,S, rowHeaderContextMenuFactoryPropertyjavafx.scene.control.ContextMenu>> An object property of aBiFunction
that can be used to define the context menu of each row of the row header. SeeRowFixAction
.- See Also:
-
southHeaderBlended
public final javafx.beans.property.BooleanProperty southHeaderBlendedPropertyThis property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.- See Also:
-
-
Constructor Details
-
TableView2
public TableView2()Creates a TableView2 control with no content. -
TableView2
Creates a TableView2 with the content provided in the items ObservableList.- Parameters:
items
- The items to insert into the TableView2, and the list to watch for changes (to automatically show in the TableView2).
-
-
Method Details
-
getRowSpan
public int getRowSpan(javafx.scene.control.TablePosition<?, ?> pos, int index) Return the current row span at the given position in the Table. If a sort is applied to the TableView2, some spanned cells may be splitted.- Parameters:
pos
- theTablePosition
index
- the index- Returns:
- the current row span for the given cell.
-
getColumnSpan
public int getColumnSpan(javafx.scene.control.TablePosition<?, ?> pos) Return the current column span.- Parameters:
pos
- TheTablePosition
- Returns:
- the current column span of a Cell.
-
getFixedRows
You can fix or unfix a row by modifying this list. CallisRowFixable(int)
before trying to fix a row. SeeTableView2
description for information.- Returns:
- an ObservableList of integer representing the fixedRows.
-
isRowFixable
public final boolean isRowFixable(int row) Indicate whether a row can be fixed or not. Call that method before adding an item withgetFixedRows()
. A row cannot be fixed alone if any cell inside the row has a row span superior to one.- Parameters:
row
- the number of row- Returns:
- true if the row can be fixed.
-
areRowsFixable
Indicates whether a List of rows can be fixed or not. A set of rows cannot be fixed if any cell inside these rows has a row span superior to the number of fixed rows.- Parameters:
list
- List of rows indices- Returns:
- true if the List of row can be fixed together.
-
isRowFixingEnabled
public final boolean isRowFixingEnabled()Return whether changes to Fixed rows are enabled.- Returns:
- whether changes to Fixed rows are enabled.
-
setRowFixingEnabled
public final void setRowFixingEnabled(boolean b) If set to true, user will be allowed to fix and unfix the rows.- Parameters:
b
- If set to true, user will be allowed to fix and unfix the rows
-
rowFixingEnabledProperty
public final javafx.beans.property.ReadOnlyBooleanProperty rowFixingEnabledProperty()Return the Boolean property associated with the allowance of fixing or unfixing some rows.- Returns:
- the Boolean property associated with the allowance of fixing or unfixing some rows.
- See Also:
-
getFixedColumns
public final javafx.collections.ObservableList<javafx.scene.control.TableColumn> getFixedColumns()You can fix or unfix a column by modifying this list.- Returns:
- an ObservableList of the fixed columns.
-
isColumnFixable
public final boolean isColumnFixable(int columnIndex) Indicate whether this column can be fixed or not.- Parameters:
columnIndex
- the number of column- Returns:
- true if the column if fixable
-
isColumnFixingEnabled
public final boolean isColumnFixingEnabled()Return whether changes to Fixed columns are enabled.- Returns:
- whether changes to Fixed columns are enabled.
-
setColumnFixingEnabled
public final void setColumnFixingEnabled(boolean b) If set to true, user will be allowed to fix and unfix the columns.- Parameters:
b
- If set to true, user will be allowed to fix and unfix the columns
-
columnFixingEnabledProperty
public final javafx.beans.property.ReadOnlyBooleanProperty columnFixingEnabledProperty()Return the Boolean property associated with the allowance of fixing or unfixing some columns.- Returns:
- the Boolean property associated with the allowance of fixing or unfixing some columns.
- See Also:
-
setRowHeaderVisible
public final void setRowHeaderVisible(boolean b) Activate and deactivate the row header.- Parameters:
b
- boolean to show or hide the header
-
isRowHeaderVisible
public final boolean isRowHeaderVisible()Return if the row header is showing.- Returns:
- a boolean telling if the row header is being shown
-
rowHeaderVisibleProperty
public final javafx.beans.property.BooleanProperty rowHeaderVisibleProperty()BooleanProperty associated with the row Header.- Returns:
- the BooleanProperty associated with the row header.
- See Also:
-
rowHeaderWidthProperty
public final javafx.beans.property.DoubleProperty rowHeaderWidthProperty()This DoubleProperty represents the with of the rowHeader. This is just representing the width of the Labels.- Returns:
- A DoubleProperty.
-
setRowHeaderWidth
public final void setRowHeaderWidth(double value) Specify a new width for the row header.- Parameters:
value
- the new width
-
getRowHeaderWidth
public final double getRowHeaderWidth()- Returns:
- the current width of the row header.
-
setRowHeader
Sets the value of therowHeader
property.- Property description:
- The row header property wraps a
TableColumn
that can be used to render the row header. By default, if this property is not set, a TableColumn will be used to render the number of row, starting from 1. - Parameters:
value
- the value for therowHeader
property- See Also:
-
getRowHeader
Gets the value of therowHeader
property.- Property description:
- The row header property wraps a
TableColumn
that can be used to render the row header. By default, if this property is not set, a TableColumn will be used to render the number of row, starting from 1. - Returns:
- the value of the
rowHeader
property - See Also:
-
rowHeaderProperty
public final javafx.beans.property.ObjectProperty<javafx.scene.control.TableColumn<S,?>> rowHeaderProperty()The row header property wraps aTableColumn
that can be used to render the row header. By default, if this property is not set, a TableColumn will be used to render the number of row, starting from 1.- Returns:
- the
rowHeader
property - See Also:
-
setRowHeaderContextMenuFactory
public final void setRowHeaderContextMenuFactory(BiFunction<Integer, S, javafx.scene.control.ContextMenu> value) Sets the value of therowHeaderContextMenuFactory
property.- Property description:
- An object property of a
BiFunction
that can be used to define the context menu of each row of the row header. SeeRowFixAction
. - Parameters:
value
- the value for therowHeaderContextMenuFactory
property- See Also:
-
getRowHeaderContextMenuFactory
public final BiFunction<Integer,S, getRowHeaderContextMenuFactory()javafx.scene.control.ContextMenu> Gets the value of therowHeaderContextMenuFactory
property.- Property description:
- An object property of a
BiFunction
that can be used to define the context menu of each row of the row header. SeeRowFixAction
. - Returns:
- the value of the
rowHeaderContextMenuFactory
property - See Also:
-
rowHeaderContextMenuFactoryProperty
public final javafx.beans.property.ObjectProperty<BiFunction<Integer,S, rowHeaderContextMenuFactoryProperty()javafx.scene.control.ContextMenu>> An object property of aBiFunction
that can be used to define the context menu of each row of the row header. SeeRowFixAction
.- Returns:
- the
rowHeaderContextMenuFactory
property - See Also:
-
setSouthHeaderBlended
public final void setSouthHeaderBlended(boolean value) Sets the value of thesouthHeaderBlended
property.- Property description:
- This property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.
- Parameters:
value
- the value for thesouthHeaderBlended
property- See Also:
-
isSouthHeaderBlended
public final boolean isSouthHeaderBlended()Gets the value of thesouthHeaderBlended
property.- Property description:
- This property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.
- Returns:
- the value of the
southHeaderBlended
property - See Also:
-
southHeaderBlendedProperty
public final javafx.beans.property.BooleanProperty southHeaderBlendedProperty()This property allows the developer to blend the south table header row with the regular table header row, so for each column, the regular header and the south table column header look like a single one.- Returns:
- the
southHeaderBlended
property - See Also:
-
getSpanType
Return theTableView2.SpanType
of a cell. This is used internally by the TableView2 but some users may find it useful.- Parameters:
rowIndex
- the number of rowmodelColumn
- the number of column- Returns:
- The
TableView2.SpanType
of a cell
-
sort
public void sort()OverridesTableView.sort()
in order to fire custom sort events when sorting starts and finishes. SeeTableView.sort()
for more details about calling directly this method.- Overrides:
sort
in classjavafx.scene.control.TableView<S>
-
createDefaultSkin
protected javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkin
in classjavafx.scene.control.TableView<S>
-
getUserAgentStylesheet
- Overrides:
getUserAgentStylesheet
in classjavafx.scene.layout.Region
-