Class TableHeaderRow
- All Implemented Interfaces:
-
Styleable,EventTarget
public class TableHeaderRow extends StackPane
- Since:
- 9
- See Also:
Property Summary
| Type | Property | Description |
|---|---|---|
final BooleanProperty |
reordering |
Indicates if a reordering operation of a column is in progress. |
Properties declared in class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties declared in class javafx.scene.Parent
needsLayout
Properties declared in class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, 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
Field Summary
Fields declared in class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields declared in class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor Summary
| Constructor | Description |
|---|---|
TableHeaderRow |
Creates a new TableHeaderRow instance to visually represent the column header area of controls such as TableView and TreeTableView. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
protected NestedTableColumnHeader |
createRootHeader() |
Creates a new NestedTableColumnHeader instance. |
protected TableColumnHeader |
getReorderingRegion() |
Returns the current TableColumnHeader being moved during reordering. |
final NestedTableColumnHeader |
getRootHeader() |
Returns the root header for all columns. |
final boolean |
isReordering() |
Gets the value of the reordering property. |
final BooleanProperty |
reorderingProperty() |
Indicates if a reordering operation of a column is in progress. |
final void |
setReordering |
Sets the value of the reordering property. |
protected void |
setReorderingRegion |
Sets the TableColumnHeader that is being moved during a reordering operation. |
protected void |
showColumnMenu |
Shows a menu containing all leaf columns as items. |
protected void |
updateScrollX() |
Called whenever the value of the horizontal scrollbar changes in order to request layout changes, shifting the TableColumnHeaders. |
protected void |
updateTableWidth() |
Updates the table width when a resize operation occurs. |
Methods declared in class javafx.scene.layout.StackPane
alignmentProperty, clearConstraints, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, setAlignment, setAlignment, setMargin
Methods declared in class javafx.scene.layout.Pane
getChildren
Methods declared in class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, 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 declared in class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods declared in 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, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, 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, isFocusVisible, isFocusWithin, 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, lookup, 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, queryAccessibleAttribute, 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 declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods declared in interface javafx.css.Styleable
getStyleableNode
Property Details
reordering
public final BooleanProperty reorderingProperty
true during a column reordering operation, and false otherwise. When a column is reordered (for example, by dragging its header), this property is updated automatically. Setting the value manually should be done when a subclass overrides the default reordering behavior. Calling setReorderingRegion(TableColumnHeader) before setting this property is required as well.- Since:
- 12
- See Also:
Constructor Details
TableHeaderRow
public TableHeaderRow(TableViewSkinBase skin)
TableView and TreeTableView.- Parameters:
-
skin- The skin used by the UI control.
Method Details
setReordering
public final void setReordering(boolean value)
reordering property.- Property description:
- Indicates if a reordering operation of a column is in progress. The value is
trueduring a column reordering operation, andfalseotherwise. When a column is reordered (for example, by dragging its header), this property is updated automatically. Setting the value manually should be done when a subclass overrides the default reordering behavior. CallingsetReorderingRegion(TableColumnHeader)before setting this property is required as well. - Parameters:
-
value- the value for thereorderingproperty - Since:
- 12
- See Also:
isReordering
public final boolean isReordering()
reordering property.- Property description:
- Indicates if a reordering operation of a column is in progress. The value is
trueduring a column reordering operation, andfalseotherwise. When a column is reordered (for example, by dragging its header), this property is updated automatically. Setting the value manually should be done when a subclass overrides the default reordering behavior. CallingsetReorderingRegion(TableColumnHeader)before setting this property is required as well. - Returns:
- the value of the
reorderingproperty - Since:
- 12
- See Also:
reorderingProperty
public final BooleanProperty reorderingProperty()
true during a column reordering operation, and false otherwise. When a column is reordered (for example, by dragging its header), this property is updated automatically. Setting the value manually should be done when a subclass overrides the default reordering behavior. Calling setReorderingRegion(TableColumnHeader) before setting this property is required as well.- Returns:
- the
reorderingproperty - Since:
- 12
- See Also:
getRootHeader
public final NestedTableColumnHeader getRootHeader()
NestedTableColumnHeader that contains the NestedTableColumnHeaders that represent each column. It spans the entire width of the TableView. This allows any developer overriding a TableColumnHeader to easily access the root header and all others TableColumnHeaders.- Implementation Note:
- This design enforces that column reordering occurs only within a single
NestedTableColumnHeaderand only at that level. - Returns:
- the root header
- Since:
- 12
updateScrollX
protected void updateScrollX()
TableColumnHeaders. For example, if custom components are added around a TableColumnHeader (such as icons above), they will also need to be shifted. When overriding, calling super() is required to shift the
TableColumnHeaders, and it's up to the developer to notify its own custom components of this change.
- Since:
- 12
updateTableWidth
protected void updateTableWidth()
TableHeaderRow. Overriding this method allows a subclass to customize the resizing behavior. Normally, the TableHeaderRow is using the full space (TableView width), but in some cases that space may be reduced. For example, if a vertical header that will display the row number is introduced, the TableHeaderRow would need to be clipped a bit shorter in order not to overlap that vertical header. Calling super() first when overriding this method allows Node.getClip() to compute the right width in order apply a transformation.
- Since:
- 12
createRootHeader
protected NestedTableColumnHeader createRootHeader()
- Returns:
- A new NestedTableColumnHeader instance.
showColumnMenu
protected void showColumnMenu(MouseEvent mouseEvent)
- Implementation Note:
- This method can be overridden to create and show a custom menu.
- Parameters:
-
mouseEvent- theMouseEventwhich was generated when the table menu button was pressed - Since:
- 21
getReorderingRegion
protected TableColumnHeader getReorderingRegion()
TableColumnHeader being moved during reordering.- Returns:
- the current
TableColumnHeaderbeing moved - Since:
- 12
setReorderingRegion
protected void setReorderingRegion(TableColumnHeader reorderingRegion)
TableColumnHeader that is being moved during a reordering operation. This is automatically set by the TableColumnHeader when reordering starts. This method should only be called manually if the default reordering behavior is overridden. Calling setReordering(boolean) after the call is required.- Parameters:
-
reorderingRegion- theTableColumnHeaderbeing reordered - Since:
- 12
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.