Top Description Fields Constructors Methods
impl.org.controlsfx.skin

public Class ExpandableTableRowSkin<S>

extends TableRowSkin<S>
Class Inheritance
Type Parameters
<S>
The type of items in the TableRow
Static Imports
java.util.Objects.requireNonNullElse

This skin is installed when you assign a org.controlsfx.control.table.TableRowExpanderColumn to a TableView. The skin will render the expanded node produced by the org.controlsfx.control.table.TableRowExpanderColumn#expandedNodeCallback whenever the expanded state is changed to true for a certain row.

Field Summary

Modifier and TypeField and Description
private TableRowExpanderColumn<S>
private final TableRow<S>
private Double

Constructor Summary

AccessConstructor and Description
public
ExpandableTableRowSkin(TableRow<S>
The table row to apply this skin for
tableRow
,
TableRowExpanderColumn<S>
The expander column, used to retrieve the expanded node when this row is expanded
expander
)

Create the ExpandableTableRowSkin and listen to changes for the item this table row represents.

Method Summary

Modifier and TypeMethod and Description
protected double

Returns:

The preferred height of the TableRow, appended with the preferred height of the expanded node if this row is currently expanded.
computePrefHeight
(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.TableRowSkinBase.computePrefHeight.

Add the preferred height of the expanded Node whenever the expanded flag is true.

private Node

Returns:

The expanded content Node
getContent
()

Create the expanded content node that should represent the current table row.

private Boolean

Returns:

A boolean indicating the expanded state of this row
isExpanded
()

Check if the current node is expanded.

protected void
layoutChildren(double x, double y, double w, double h)

Overrides javafx.scene.control.skin.TableRowSkinBase.layoutChildren.

Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.

Inherited from javafx.scene.control.skin.TableRowSkin:
createCelldisposegetTableColumngetVisibleLeafColumnsqueryAccessibleAttributeupdateCell

Field Detail

expanderback to summary
private TableRowExpanderColumn<S> expander
tableRowback to summary
private final TableRow<S> tableRow
tableRowPrefHeightback to summary
private Double tableRowPrefHeight

Constructor Detail

ExpandableTableRowSkinback to summary
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:TableRow<S>

The table row to apply this skin for

expander:TableRowExpanderColumn<S>

The expander column, used to retrieve the expanded node when this row is expanded

Method Detail

computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.TableRowSkinBase.computePrefHeight.

Add the preferred height of the expanded Node whenever the expanded flag is true.

Returns:double

The preferred height of the TableRow, appended with the preferred height of the expanded node if this row is currently expanded.

Annotations
@Override
getContentback to summary
private Node getContent()

Create the expanded content node that should represent the current table row. If the expanded content node is not currently in the children list of the TableRow it is automatically added.

Returns:Node

The expanded content Node

isExpandedback to summary
private Boolean isExpanded()

Check if the current node is expanded. This is done by checking that there is an item for the current row, and that the expanded property for the row is true.

Returns:Boolean

A boolean indicating the expanded state of this row

layoutChildrenback to summary
protected void layoutChildren(double x, double y, double w, double h)

Overrides javafx.scene.control.skin.TableRowSkinBase.layoutChildren.

Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.

Annotations
@Override