Class ExpandableTableRowSkin<S>

  • Type Parameters:
    S - The type of items in the TableRow
    All Implemented Interfaces:
    javafx.scene.control.Skin<javafx.scene.control.TableRow<S>>

    public class ExpandableTableRowSkin<S>
    extends javafx.scene.control.skin.TableRowSkin<S>
    This skin is installed when you assign a TableRowExpanderColumn to a TableView. The skin will render the expanded node produced by the TableRowExpanderColumn.expandedNodeCallback whenever the expanded state is changed to true for a certain row.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExpandableTableRowSkin​(javafx.scene.control.TableRow<S> tableRow, TableRowExpanderColumn<S> expander)
      Create the ExpandableTableRowSkin and listen to changes for the item this table row represents.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double computePrefHeight​(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Add the preferred height of the expanded Node whenever the expanded flag is true.
      protected void layoutChildren​(double x, double y, double w, double h)
      Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.
      • Methods inherited from class javafx.scene.control.skin.TableRowSkin

        createCell, dispose, getTableColumn, getVisibleLeafColumns, queryAccessibleAttribute, updateCell
      • Methods inherited from class javafx.scene.control.skin.TableRowSkinBase

        computeMaxHeight, computeMinHeight, computePrefWidth, graphicProperty
      • Methods inherited from class javafx.scene.control.skin.CellSkinBase

        cellSizeProperty, getCellSize, getClassCssMetaData, getCssMetaData
      • Methods inherited from class javafx.scene.control.skin.LabeledSkinBase

        computeBaselineOffset, computeMaxWidth, computeMinWidth, layoutLabelInArea, layoutLabelInArea, updateChildren
      • Methods inherited from class javafx.scene.control.SkinBase

        consumeMouseEvents, executeAccessibleAction, getChildren, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
    • Constructor Detail

      • ExpandableTableRowSkin

        public ExpandableTableRowSkin​(javafx.scene.control.TableRow<S> tableRow,
                                      TableRowExpanderColumn<S> expander)
        Create the ExpandableTableRowSkin and listen to changes for the item this table row represents. When the item is changed, the old expanded node, if any, is removed from the children list of the TableRow.
        Parameters:
        tableRow - The table row to apply this skin for
        expander - The expander column, used to retrieve the expanded node when this row is expanded
    • Method Detail

      • computePrefHeight

        protected double computePrefHeight​(double width,
                                           double topInset,
                                           double rightInset,
                                           double bottomInset,
                                           double leftInset)
        Add the preferred height of the expanded Node whenever the expanded flag is true.
        Overrides:
        computePrefHeight in class javafx.scene.control.skin.TableRowSkinBase<S,​javafx.scene.control.TableRow<S>,​javafx.scene.control.TableCell<S,​?>>
        Returns:
        The preferred height of the TableRow, appended with the preferred height of the expanded node if this row is currently expanded.
      • layoutChildren

        protected void layoutChildren​(double x,
                                      double y,
                                      double w,
                                      double h)
        Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.
        Overrides:
        layoutChildren in class javafx.scene.control.skin.TableRowSkinBase<S,​javafx.scene.control.TableRow<S>,​javafx.scene.control.TableCell<S,​?>>