Top Description Fields Constructors Methods
javafx.scene.control

public Class TreeTableRow<T>

extends IndexedCell<T>
Class Inheritance
Type Parameters
<T>
The type of the item contained within the Cell.
Imports
javafx.css.PseudoClass, javafx.scene.control.skin.TreeTableRowSkin, java.lang.ref.WeakReference, javafx.beans.InvalidationListener, .Observable, .WeakInvalidationListener, javafx.beans.property.BooleanProperty, .ObjectProperty, .ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, .SimpleObjectProperty, javafx.collections.ListChangeListener, .WeakListChangeListener, javafx.scene.AccessibleAction, .AccessibleAttribute, .AccessibleRole, .Node, javafx.scene.control.TreeTableView.TreeTableViewFocusModel, .TreeTableView.TreeTableViewSelectionModel

TreeTableRow is an IndexedCell, but rarely needs to be used by developers creating TreeTableView instances. The only time TreeTableRow is likely to be encountered at all by a developer is if they wish to create a custom rowFactory that replaces an entire row of a TreeTableView.

More often than not, it is actually easier for a developer to customize individual cells in a row, rather than the whole row itself. To do this, you can specify a custom cellFactory on each TreeTableColumn instance.

Since
JavaFX 8.0
See Also
TreeTableView, TreeTableColumn, TreeTableCell, IndexedCell, Cell

Field Summary

Modifier and TypeField and Description
private static final PseudoClass
private static final String
private ObjectProperty<Node>
private final InvalidationListener
private static final PseudoClass
private final InvalidationListener
private boolean
private final InvalidationListener
private boolean
private final ListChangeListener<Integer>
private ReadOnlyObjectWrapper<TreeItem<T>>
private final InvalidationListener
private ReadOnlyObjectWrapper<TreeTableView<T>>
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakListChangeListener<Integer>
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public
TreeTableRow()

Creates a default TreeTableRow instance.

Method Summary

Modifier and TypeMethod and Description
public void
cancelEdit()

Overrides javafx.scene.control.Cell.cancelEdit.

Cancels an edit to the value of the cell.

public void
commitEdit(T newValue)

Overrides javafx.scene.control.Cell.commitEdit.

Commits an edit to the value of the cell.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final ObjectProperty<Node>

Returns:

the disclosure node property
disclosureNodeProperty
()

The disclosure node is commonly seen represented as a triangle that rotates on screen to indicate whether or not the TreeItem that it is placed beside is expanded or collapsed.

public void
executeAccessibleAction(AccessibleAction action, Object... parameters)

Overrides javafx.scene.control.Control.executeAccessibleAction.

This method is called by the assistive technology to request the action indicated by the argument should be executed.

public final Node

Returns:

the disclosure node
getDisclosureNode
()

Returns the current disclosure node set in this TreeTableCell.

public final TreeItem<T>

Returns:

the TreeItem currently set in this TreeTableRow
getTreeItem
()

Returns the TreeItem currently set in this TreeTableRow.

public final TreeTableView<T>

Returns:

the tree table view
getTreeTableView
()

Returns the TreeTableView associated with this TreeTableCell.

pack-priv void
indexChanged(int oldIndex, int newIndex)

Overrides javafx.scene.control.IndexedCell.indexChanged.

This method is called whenever the index is changed, regardless of whether the new index is the same as the old index.

public Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

public final void
setDisclosureNode(Node
the disclosure node
value
)

The node to use as the "disclosure" triangle, or toggle, used for expanding and collapsing items.

private void
private void
public void
startEdit()

Overrides javafx.scene.control.Cell.startEdit.

Starts an edit to the value of the cell.

public final ReadOnlyObjectProperty<TreeItem<T>>

Returns:

the tree item property
treeItemProperty
()

Each TreeTableCell represents at most a single TreeItem, which is represented by this property.

public final ReadOnlyObjectProperty<TreeTableView<T>>

Returns:

the tree table view property
treeTableViewProperty
()

A TreeTableCell is explicitly linked to a single TreeTableView instance, which is represented by this property.

private void
private void
private void
updateItem(int oldIndex)

private void
public final void
updateTreeItem(TreeItem<T>
The new TreeItem that should be associated with this TreeTableCell.

Note

This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly.

treeItem
)

Updates the TreeItem associated with this TreeTableCell.

public final void
updateTreeTableView(TreeTableView<T>
The new TreeTableView that should be associated with this TreeTableCell.

Note

This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly.

treeTable
)

Updates the TreeTableView associated with this TreeTableCell.

Inherited from javafx.scene.control.IndexedCell:
getIndexindexPropertyupdateIndex

Field Detail

COLLAPSED_PSEUDOCLASS_STATEback to summary
private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE
DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS

Hides javafx.scene.control.IndexedCell.DEFAULT_STYLE_CLASS.

disclosureNodeback to summary
private ObjectProperty<Node> disclosureNode
editingListenerback to summary
private final InvalidationListener editingListener
EXPANDED_PSEUDOCLASS_STATEback to summary
private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE
focusedListenerback to summary
private final InvalidationListener focusedListener
isFirstRunback to summary
private boolean isFirstRun
leafListenerback to summary
private final InvalidationListener leafListener
oldExpandedback to summary
private boolean oldExpanded
selectedListenerback to summary
private final ListChangeListener<Integer> selectedListener
treeItemback to summary
private ReadOnlyObjectWrapper<TreeItem<T>> treeItem
treeItemExpandedInvalidationListenerback to summary
private final InvalidationListener treeItemExpandedInvalidationListener
treeTableViewback to summary
private ReadOnlyObjectWrapper<TreeTableView<T>> treeTableView
weakEditingListenerback to summary
private final WeakInvalidationListener weakEditingListener
weakFocusedListenerback to summary
private final WeakInvalidationListener weakFocusedListener
weakLeafListenerback to summary
private final WeakInvalidationListener weakLeafListener
weakSelectedListenerback to summary
private final WeakListChangeListener<Integer> weakSelectedListener
weakTreeItemExpandedInvalidationListenerback to summary
private final WeakInvalidationListener weakTreeItemExpandedInvalidationListener

Constructor Detail

TreeTableRowback to summary
public TreeTableRow()

Creates a default TreeTableRow instance.

Method Detail

cancelEditback to summary
public void cancelEdit()

Overrides javafx.scene.control.Cell.cancelEdit.

Doc from javafx.scene.control.Cell.cancelEdit.

Cancels an edit to the value of the cell. Call this function to transition from an editing state into a non-editing state, without saving any user input.

Annotations
@Override
commitEditback to summary
public void commitEdit(T newValue)

Overrides javafx.scene.control.Cell.commitEdit.

Doc from javafx.scene.control.Cell.commitEdit.

Commits an edit to the value of the cell. Call this function when appropriate (based on the user interaction requirements of your cell editing user interface) to do two things:

  1. Fire the appropriate events back to the backing UI control (e.g., ListView). This will begin the process of pushing this edit back to the relevant data source / property (although it does not guarantee that this will be successful - that is dependent upon the specific edit commit handler being used). Refer to the UI control class javadoc for more detail.
  2. Begin the transition from an editing state into a non-editing state.

In general there is no need to override this method in custom cell implementations - it should be sufficient to simply call this method when appropriate (e.g., when the user pressed the Enter key, you may do something like cell.commitEdit(converter.fromString(textField.getText()));

Annotations
@Override
createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Annotations
@Override
disclosureNodePropertyback to summary
public final ObjectProperty<Node> disclosureNodeProperty()

The disclosure node is commonly seen represented as a triangle that rotates on screen to indicate whether or not the TreeItem that it is placed beside is expanded or collapsed.

Returns:ObjectProperty<Node>

the disclosure node property

executeAccessibleActionback to summary
public void executeAccessibleAction(AccessibleAction action, Object... parameters)

Overrides javafx.scene.control.Control.executeAccessibleAction.

Doc from javafx.scene.control.Control.executeAccessibleAction.

This method is called by the assistive technology to request the action indicated by the argument should be executed.

This method is commonly overridden by subclasses to implement action that are required for a specific role.
If a particular action is not handled, the superclass implementation must be called.

Annotations
@Override
getDisclosureNodeback to summary
public final Node getDisclosureNode()

Returns the current disclosure node set in this TreeTableCell.

Returns:Node

the disclosure node

getTreeItemback to summary
public final TreeItem<T> getTreeItem()

Returns the TreeItem currently set in this TreeTableRow.

Returns:TreeItem<T>

the TreeItem currently set in this TreeTableRow

getTreeTableViewback to summary
public final TreeTableView<T> getTreeTableView()

Returns the TreeTableView associated with this TreeTableCell.

Returns:TreeTableView<T>

the tree table view

indexChangedback to summary
pack-priv void indexChanged(int oldIndex, int newIndex)

Overrides javafx.scene.control.IndexedCell.indexChanged.

Doc from javafx.scene.control.IndexedCell.indexChanged.

This method is called whenever the index is changed, regardless of whether the new index is the same as the old index.

Annotations
@Override
queryAccessibleAttributeback to summary
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

Doc from javafx.scene.control.Control.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

This method is commonly overridden by subclasses to implement attributes that are required for a specific role.
If a particular attribute is not handled, the superclass implementation must be called.

Annotations
@Override
setDisclosureNodeback to summary
public final void setDisclosureNode(Node value)

The node to use as the "disclosure" triangle, or toggle, used for expanding and collapsing items. This is only used in the case of an item in the tree which contains child items. If not specified, the TreeTableCell's Skin implementation is responsible for providing a default disclosure node.

Parameters
value:Node

the disclosure node

setTreeItemback to summary
private void setTreeItem(TreeItem<T> value)
setTreeTableViewback to summary
private void setTreeTableView(TreeTableView<T> value)
startEditback to summary
public void startEdit()

Overrides javafx.scene.control.Cell.startEdit.

Doc from javafx.scene.control.Cell.startEdit.

Starts an edit to the value of the cell. Call this function to transition from a non-editing state into an editing state, if the cell is editable. If this cell is already in an editing state, it will stay in it.

Annotations
@Override
treeItemPropertyback to summary
public final ReadOnlyObjectProperty<TreeItem<T>> treeItemProperty()

Each TreeTableCell represents at most a single TreeItem, which is represented by this property.

Returns:ReadOnlyObjectProperty<TreeItem<T>>

the tree item property

treeTableViewPropertyback to summary
public final ReadOnlyObjectProperty<TreeTableView<T>> treeTableViewProperty()

A TreeTableCell is explicitly linked to a single TreeTableView instance, which is represented by this property.

Returns:ReadOnlyObjectProperty<TreeTableView<T>>

the tree table view property

updateEditingback to summary
private void updateEditing()
updateFocusback to summary
private void updateFocus()
updateItemback to summary
private void updateItem(int oldIndex)
updateSelectionback to summary
private void updateSelection()
updateTreeItemback to summary
public final void updateTreeItem(TreeItem<T> treeItem)

Updates the TreeItem associated with this TreeTableCell.

Parameters
treeItem:TreeItem<T>

The new TreeItem that should be associated with this TreeTableCell.

Note

This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly.

updateTreeTableViewback to summary
public final void updateTreeTableView(TreeTableView<T> treeTable)

Updates the TreeTableView associated with this TreeTableCell.

Parameters
treeTable:TreeTableView<T>

The new TreeTableView that should be associated with this TreeTableCell.

Note

This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly.