Top Description Fields Constructors Methods
javafx.scene.control

public Class TableRow<T>

extends IndexedCell<T>
Class Inheritance
Type Parameters
<T>
The type of the item contained within the Cell.
Imports
javafx.beans.InvalidationListener, .WeakInvalidationListener, javafx.collections.ListChangeListener, .WeakListChangeListener, javafx.scene.AccessibleAttribute, .AccessibleRole, javafx.scene.control.TableView.TableViewFocusModel, java.lang.ref.WeakReference, java.util.List, javafx.beans.property.ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, javafx.scene.control.skin.TableRowSkin

TableRow is an IndexedCell, but rarely needs to be used by developers creating TableView instances. The only time TableRow 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 TableView.

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 TableColumn instance.

Since
JavaFX 2.0
See Also
TableView, TableColumn, TableCell, IndexedCell, Cell

Field Summary

Modifier and TypeField and Description
private static final String
private final InvalidationListener
private final InvalidationListener
private boolean
private ListChangeListener<Integer>
private ReadOnlyObjectWrapper<TableView<T>>
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakListChangeListener<Integer>

Constructor Summary

AccessConstructor and Description
public
TableRow()

Constructs a default TableRow instance with a style class of 'table-row-cell'

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final TableView<T>
pack-priv void
indexChanged(int
the old index
oldIndex
,
int
the new index
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
the requested attribute
attribute
,
Object...
optional list of parameters
parameters
)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

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

private void
public final ReadOnlyObjectProperty<TableView<T>>

Returns:

the TableView associated with this Cell
tableViewProperty
()

The TableView associated with this Cell.

private ReadOnlyObjectWrapper<TableView<T>>
private void
private void
private void
updateItem(int oldIndex)

private void
public final void
updateTableView(TableView<T>
the TableView
tv
)

Updates the TableView associated with this TableCell.

Inherited from javafx.scene.control.IndexedCell:
getIndexindexPropertyupdateIndex

Field Detail

DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS

Hides javafx.scene.control.IndexedCell.DEFAULT_STYLE_CLASS.

editingListenerback to summary
private final InvalidationListener editingListener
focusedListenerback to summary
private final InvalidationListener focusedListener
isFirstRunback to summary
private boolean isFirstRun
selectedListenerback to summary
private ListChangeListener<Integer> selectedListener
tableViewback to summary
private ReadOnlyObjectWrapper<TableView<T>> tableView
weakEditingListenerback to summary
private final WeakInvalidationListener weakEditingListener
weakFocusedListenerback to summary
private final WeakInvalidationListener weakFocusedListener
weakSelectedListenerback to summary
private final WeakListChangeListener<Integer> weakSelectedListener

Constructor Detail

TableRowback to summary
public TableRow()

Constructs a default TableRow instance with a style class of 'table-row-cell'

Method Detail

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(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getTableViewback to summary
public final TableView<T> getTableView()
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.

Parameters
oldIndex:int

the old index

newIndex:int

the new 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.

Parameters
attribute:AccessibleAttribute

Doc from javafx.scene.Node.queryAccessibleAttribute.

the requested attribute

parameters:Object[]

Doc from javafx.scene.Node.queryAccessibleAttribute.

optional list of parameters

Returns:Object

Doc from javafx.scene.Node.queryAccessibleAttribute.

the value for the requested attribute

Annotations
@Override
setTableViewback to summary
private void setTableView(TableView<T> value)
tableViewPropertyback to summary
public final ReadOnlyObjectProperty<TableView<T>> tableViewProperty()

The TableView associated with this Cell.

Returns:ReadOnlyObjectProperty<TableView<T>>

the TableView associated with this Cell

tableViewPropertyImplback to summary
private ReadOnlyObjectWrapper<TableView<T>> tableViewPropertyImpl()
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()
updateTableViewback to summary
public final void updateTableView(TableView<T> tv)

Updates the TableView associated with this TableCell. This is typically only done once when the TableCell is first added to the TableView.

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.

Parameters
tv:TableView<T>

the TableView