- java.lang.Object
- 
- javafx.scene.Node
- 
- javafx.scene.Parent
- 
- javafx.scene.layout.Region
- 
- javafx.scene.layout.Pane
- 
- javafx.scene.layout.StackPane
- 
- javafx.scene.control.skin.TableHeaderRow
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- Styleable,- EventTarget
 
 public class TableHeaderRow extends StackPane Region responsible for painting the entire row of column headers.- Since:
- 9
- See Also:
- TableView,- TableViewSkin,- TreeTableView,- TreeTableViewSkin
 
- 
- 
Property SummaryProperties Type Property Description BooleanPropertyreorderingIndicates if a reordering operation of a column is in progress.- 
Properties inherited from class javafx.scene.layout.Regionbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
 - 
Properties inherited from class javafx.scene.ParentneedsLayout
 - 
Properties inherited from class javafx.scene.NodeaccessibleHelp, 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
 
- 
 - 
Field Summary- 
Fields inherited from class javafx.scene.layout.RegionUSE_COMPUTED_SIZE, USE_PREF_SIZE
 - 
Fields inherited from class javafx.scene.NodeBASELINE_OFFSET_SAME_AS_HEIGHT
 
- 
 - 
Constructor SummaryConstructors Constructor Description TableHeaderRow(TableViewSkinBase skin)Creates a new TableHeaderRow instance to visually represent the column header area of controls such asTableViewandTreeTableView.
 - 
Method SummaryModifier and Type Method Description protected doublecomputeMinHeight(double width)Computes the minimum height of this region.protected doublecomputePrefHeight(double width)Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.protected doublecomputePrefWidth(double height)Computes the preferred width of this region for the given height.protected NestedTableColumnHeadercreateRootHeader()Creates a new NestedTableColumnHeader instance.protected TableColumnHeadergetReorderingRegion()Returns the currentTableColumnHeaderbeing moved during reordering.NestedTableColumnHeadergetRootHeader()Returns the root header for all columns.booleanisReordering()Gets the value of the property reordering.protected voidlayoutChildren()Invoked during the layout pass to layout the children in thisParent.BooleanPropertyreorderingProperty()Indicates if a reordering operation of a column is in progress.voidsetReordering(boolean value)Sets the value of the property reordering.protected voidsetReorderingRegion(TableColumnHeader reorderingRegion)Sets theTableColumnHeaderthat is being moved during a reordering operation.protected voidupdateScrollX()Called whenever the value of the horizontal scrollbar changes in order to request layout changes, shifting theTableColumnHeaders.protected voidupdateTableWidth()Updates the table width when a resize operation occurs.- 
Methods inherited from class javafx.scene.layout.StackPanealignmentProperty, clearConstraints, computeMinWidth, getAlignment, getAlignment, getClassCssMetaData, getContentBias, getCssMetaData, getMargin, requestLayout, setAlignment, setAlignment, setMargin
 - 
Methods inherited from class javafx.scene.layout.PanegetChildren
 - 
Methods inherited from class javafx.scene.layout.RegionbackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, 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 inherited from class javafx.scene.ParentgetBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBounds
 - 
Methods inherited from class javafx.scene.NodeaccessibleHelpProperty, 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, 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, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface javafx.css.StyleablegetStyleableNode
 
- 
 
- 
- 
- 
Property Detail- 
reorderingpublic final BooleanProperty reorderingProperty Indicates if a reordering operation of a column is in progress. The value istrueduring 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.- Since:
- 12
- See Also:
- isReordering(),- setReordering(boolean)
 
 
- 
 - 
Constructor Detail- 
TableHeaderRowpublic TableHeaderRow(TableViewSkinBase skin) Creates a new TableHeaderRow instance to visually represent the column header area of controls such asTableViewandTreeTableView.- Parameters:
- skin- The skin used by the UI control.
 
 
- 
 - 
Method Detail- 
setReorderingpublic final void setReordering(boolean value) Sets the value of the property reordering.- 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.
- Since:
- 12
 
 - 
isReorderingpublic final boolean isReordering() Gets the value of the property reordering.- 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.
- Since:
- 12
 
 - 
reorderingPropertypublic final BooleanProperty reorderingProperty() Indicates if a reordering operation of a column is in progress. The value istrueduring 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.- Since:
- 12
- See Also:
- isReordering(),- setReordering(boolean)
 
 - 
getRootHeaderpublic final NestedTableColumnHeader getRootHeader() Returns the root header for all columns. The root header is aNestedTableColumnHeaderthat contains theNestedTableColumnHeaders that represent each column. It spans the entire width of theTableView. This allows any developer overriding aTableColumnHeaderto easily access the root header and all othersTableColumnHeaders.- Implementation Note:
- This design enforces that column reordering occurs only within a single NestedTableColumnHeaderand only at that level.
- Returns:
- the root header
- Since:
- 12
 
 - 
layoutChildrenprotected void layoutChildren() Invoked during the layout pass to layout the children in thisParent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.Subclasses should override this function to layout content as needed. - Overrides:
- layoutChildrenin class- StackPane
 
 - 
computePrefWidthprotected double computePrefWidth(double height) Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.- Overrides:
- computePrefWidthin class- StackPane
- Parameters:
- height- the height that should be used if preferred width depends on it
- Returns:
- the computed preferred width for this region
 
 - 
computeMinHeightprotected double computeMinHeight(double width) Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
- computeMinHeightin class- StackPane
- Parameters:
- width- the width that should be used if min height depends on it
- Returns:
- the computed minimum height for this region
 
 - 
computePrefHeightprotected double computePrefHeight(double width) Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.- Overrides:
- computePrefHeightin class- StackPane
- Parameters:
- width- the width that should be used if preferred height depends on it
- Returns:
- the computed preferred height for this region
 
 - 
updateScrollXprotected void updateScrollX() Called whenever the value of the horizontal scrollbar changes in order to request layout changes, shifting theTableColumnHeaders.For example, if custom components are added around a TableColumnHeader(such as icons above), they will also need to be shifted. When overriding, callingsuper()is required to shift theTableColumnHeaders, and it's up to the developer to notify its own custom components of this change.- Since:
- 12
 
 - 
updateTableWidthprotected void updateTableWidth() Updates the table width when a resize operation occurs. This method is called continuously when the control width is resizing in order to properly clip thisTableHeaderRow. Overriding this method allows a subclass to customize the resizing behavior.Normally, the TableHeaderRowis using the full space (TableViewwidth), but in some cases that space may be reduced. For example, if a vertical header that will display the row number is introduced, theTableHeaderRowwould need to be clipped a bit shorter in order not to overlap that vertical header. Callingsuper()first when overriding this method allowsNode.getClip()to compute the right width in order apply a transformation.- Since:
- 12
 
 - 
createRootHeaderprotected NestedTableColumnHeader createRootHeader() Creates a new NestedTableColumnHeader instance. By default this method should not be overridden, but in some circumstances it makes sense (e.g. testing, or when extreme customization is desired).- Returns:
- A new NestedTableColumnHeader instance.
 
 - 
getReorderingRegionprotected TableColumnHeader getReorderingRegion() Returns the currentTableColumnHeaderbeing moved during reordering.- Returns:
- the current TableColumnHeaderbeing moved
- Since:
- 12
 
 - 
setReorderingRegionprotected void setReorderingRegion(TableColumnHeader reorderingRegion) Sets theTableColumnHeaderthat is being moved during a reordering operation. This is automatically set by theTableColumnHeaderwhen reordering starts. This method should only be called manually if the default reordering behavior is overridden. CallingsetReordering(boolean)after the call is required.- Parameters:
- reorderingRegion- the- TableColumnHeaderbeing reordered
- Since:
- 12
 
 
- 
 
-