APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.control.skin

public abstract Class TableRowSkinBase<T, C extends IndexedCell<T>, R extends IndexedCell<T>>

extends CellSkinBase<C extends IndexedCell<T>>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.skin.TreeTableRowSkin, javafx.scene.control.skin.TableRowSkin
Type Parameters
<T>
The type of the cell (i.e. the generic type of the IndexedCell subclass).
<C>
The cell type (e.g. TableRow or TreeTableRow)
<R>
The type of cell that is contained within each row (e.g. javafx.scene.control.TableCell or javafx.scene.control.TreeTableCell).
Imports
java.lang.ref.Reference, .WeakReference, java.util.*, com.sun.javafx.scene.NodeHelper, javafx.animation.FadeTransition, javafx.beans.property.ObjectProperty, javafx.collections.ObservableList, javafx.css.StyleOrigin, .StyleableObjectProperty, javafx.geometry.Pos, javafx.scene.Node, .Parent, .Scene, javafx.scene.control.*, javafx.scene.layout.Region, javafx.util.Duration

TableRowSkinBase is the base skin class used by controls such as javafx.scene.control.TableRow and javafx.scene.control.TreeTableRow (the concrete classes are TableRowSkin and TreeTableRowSkin, respectively).
Since
9
See Also
javafx.scene.control.TableRow, javafx.scene.control.TreeTableRow, TableRowSkin, TreeTableRowSkin

Field Summary

Modifier and TypeField and Description
pack-priv final List<R>
pack-priv WeakHashMap<TableColumnBase<S, T>, Reference<R>>
private Map<Node, FadeTransition>
private static final Duration
pack-priv boolean
pack-priv static final Map<TableColumnBase<?, ?>, Double>
Inherited from javafx.scene.control.skin.CellSkinBase:
DEFAULT_CELL_SIZE

Constructor Summary

AccessConstructor and Description
public
TableRowSkinBase(C
The control that this skin should be installed onto.
control
)

Creates a new instance of TableRowSkinBase, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses.

Method Summary

Modifier and TypeMethod and Description
private void
pack-priv final void
protected double
computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

protected abstract R

Returns:

the created cell
createCell
(TableColumnBase<T, ?>
the table column
tc
)

Creates a new cell instance that is suitable for representing the given table column instance.

private R
public void
dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

private void
fadeIn(final Node node)

private void
fadeOut(final Node node)

pack-priv Node
pack-priv double
pack-priv int
pack-priv double
protected abstract TableColumnBase<T, ?>

Returns:

the table column
getTableColumn
(R
The cell for which a TableColumn is desired.
cell
)

Returns the TableColumnBase instance for the given cell instance.

pack-priv TableColumnBase<S, T>
getTreeColumn()

Returns the table column that should show the disclosure nodes and / or a graphic.

pack-priv VirtualFlow<C>
protected abstract ObservableList<? extends TableColumnBase<S, T>>

Returns:

the list of visible leaf columns
getVisibleLeafColumns
()

Returns an unmodifiable list containing the currently visible leaf columns.

protected ObjectProperty<Node>

Returns:

the graphic to draw on the inside of the disclosure node
graphicProperty
()

Returns the graphic to draw on the inside of the disclosure node.

private boolean
isColumnPartiallyOrFullyVisible(double start, double width, VirtualFlow<C> virtualFlow)

pack-priv boolean
pack-priv boolean
isDisclosureNodeVisible()

Used to represent whether a disclosure node is visible for _this_ table row.

pack-priv boolean
isIndentationRequired()

Used to represent whether the current virtual flow owner is wanting indentation to be used in this table row.

pack-priv boolean
protected void
layoutChildren(double x, double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

private void
private void
private void
pack-priv void
setDirty(boolean dirty)

private boolean
private void
protected abstract void
updateCell(R
The cell for which we want to inform it of its owner row.
cell
,
C
The row which will be set on the given cell.
row
)

A method to allow the given cell to be told that it is a member of the given row.

pack-priv void
pack-priv void
Inherited from javafx.scene.control.skin.CellSkinBase:
cellSizePropertygetCellSizegetClassCssMetaDatagetCssMetaData

Field Detail

cellsback to summary
pack-priv final List<R> cells
cellsMapback to summary
pack-priv WeakHashMap<TableColumnBase<S, T>, Reference<R>> cellsMap
currentTransitionsback to summary
private Map<Node, FadeTransition> currentTransitions
FADE_DURATIONback to summary
private static final Duration FADE_DURATION
isDirtyback to summary
pack-priv boolean isDirty
maxDisclosureWidthMapback to summary
pack-priv static final Map<TableColumnBase<?, ?>, Double> maxDisclosureWidthMap

Constructor Detail

TableRowSkinBaseback to summary
public TableRowSkinBase(C control)

Creates a new instance of TableRowSkinBase, although note that this instance does not handle any behavior / input mappings - this needs to be handled appropriately by subclasses.

Parameters
control:C

The control that this skin should be installed onto.

Method Detail

cancelTransitionback to summary
private void cancelTransition(Node node)
checkStateback to summary
pack-priv final void checkState()
computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMaxHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMaxHeight.

Computes the maximum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

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

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.

Annotations
@Override
createCellback to summary
protected abstract R createCell(TableColumnBase<T, ?> tc)

Creates a new cell instance that is suitable for representing the given table column instance.

Parameters
tc:TableColumnBase<T, ?>

the table column

Returns:R

the created cell

createCellAndCacheback to summary
private R createCellAndCache(TableColumnBase<T, ?> col)
disposeback to summary
public void dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
fadeInback to summary
private void fadeIn(final Node node)
fadeOutback to summary
private void fadeOut(final Node node)
getDisclosureNodeback to summary
pack-priv Node getDisclosureNode()
getFixedCellSizeback to summary
pack-priv double getFixedCellSize()
getIndentationLevelback to summary
pack-priv int getIndentationLevel(C control)
getIndentationPerLevelback to summary
pack-priv double getIndentationPerLevel()
getTableColumnback to summary
protected abstract TableColumnBase<T, ?> getTableColumn(R cell)

Returns the TableColumnBase instance for the given cell instance.

Parameters
cell:R

The cell for which a TableColumn is desired.

Returns:TableColumnBase<T, ?>

the table column

getTreeColumnback to summary
pack-priv TableColumnBase<S, T> getTreeColumn()

Returns the table column that should show the disclosure nodes and / or a graphic. By default this is the left-most column.

getVirtualFlowback to summary
pack-priv VirtualFlow<C> getVirtualFlow()
getVisibleLeafColumnsback to summary
protected abstract ObservableList<? extends TableColumnBase<S, T>> getVisibleLeafColumns()

Returns an unmodifiable list containing the currently visible leaf columns.

Returns:ObservableList<? extends TableColumnBase<S, T>>

the list of visible leaf columns

graphicPropertyback to summary
protected ObjectProperty<Node> graphicProperty()

Returns the graphic to draw on the inside of the disclosure node. Null is acceptable when no graphic should be shown. Commonly this is the graphic associated with a TreeItem (i.e. treeItem.getGraphic()), rather than a graphic associated with a cell.

Returns:ObjectProperty<Node>

the graphic to draw on the inside of the disclosure node

isColumnPartiallyOrFullyVisibleback to summary
private boolean isColumnPartiallyOrFullyVisible(double start, double width, VirtualFlow<C> virtualFlow)
isDirtyback to summary
pack-priv boolean isDirty()
isDisclosureNodeVisibleback to summary
pack-priv boolean isDisclosureNodeVisible()

Used to represent whether a disclosure node is visible for _this_ table row. Not to be confused with isIndentationRequired(), which is the more general API.

isIndentationRequiredback to summary
pack-priv boolean isIndentationRequired()

Used to represent whether the current virtual flow owner is wanting indentation to be used in this table row.

isShowRootback to summary
pack-priv boolean isShowRoot()
layoutChildrenback to summary
protected void layoutChildren(double x, double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

Doc from javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

Annotations
@Override
recreateCellsback to summary
private void recreateCells()
removeTransitionback to summary
private void removeTransition(Node node)
requestCellUpdateback to summary
private void requestCellUpdate()
setDirtyback to summary
pack-priv void setDirty(boolean dirty)
shouldAnimateback to summary
private boolean shouldAnimate()
trackTransitionback to summary
private void trackTransition(Node node, FadeTransition transition)
updateCellback to summary
protected abstract void updateCell(R cell, C row)

A method to allow the given cell to be told that it is a member of the given row. How this is implemented is dependent on the actual cell implementation.

Parameters
cell:R

The cell for which we want to inform it of its owner row.

row:C

The row which will be set on the given cell.

updateCellsback to summary
pack-priv void updateCells()
updateLeafColumnsback to summary
pack-priv void updateLeafColumns()