- java.lang.Object
-
- javafx.scene.control.SkinBase<C>
-
- javafx.scene.control.skin.LabeledSkinBase<C>
-
- javafx.scene.control.skin.CellSkinBase<C>
-
- javafx.scene.control.skin.TableRowSkinBase<T,TableRow<T>,TableCell<T,?>>
-
- javafx.scene.control.skin.TableRowSkin<S>
-
- impl.org.controlsfx.skin.ExpandableTableRowSkin<S>
-
- Type Parameters:
S
- The type of items in the TableRow
public class ExpandableTableRowSkin<S> extends TableRowSkin<S>
This skin is installed when you assign aTableRowExpanderColumn
to a TableView. The skin will render the expanded node produced by theTableRowExpanderColumn.expandedNodeCallback
whenever the expanded state is changed to true for a certain row.
-
-
Property Summary
-
Properties inherited from class javafx.scene.control.skin.TableRowSkinBase
graphic
-
Properties inherited from class javafx.scene.control.skin.CellSkinBase
cellSize
-
-
Constructor Summary
Constructors Constructor Description ExpandableTableRowSkin(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, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners
-
-
-
-
Constructor Detail
-
ExpandableTableRowSkin
public ExpandableTableRowSkin(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 forexpander
- 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 classTableRowSkinBase<S,TableRow<S>,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 classTableRowSkinBase<S,TableRow<S>,TableCell<S,?>>
-
-