Class TableCell<S,T>

Type Parameters:
S - The type of the TableView generic type (i.e. S == TableView<S>). This should also match with the first generic type in TableColumn.
T - The type of the item contained within the Cell.
All Implemented Interfaces:
Styleable, EventTarget, Skinnable
Direct Known Subclasses:
CheckBoxTableCell, ChoiceBoxTableCell, ComboBoxTableCell, ProgressBarTableCell, TextFieldTableCell

public class TableCell<S,T> extends IndexedCell<T>
Represents a single row/column intersection in a TableView. To represent this intersection, a TableCell contains an index property, as well as a tableColumn property. In addition, a TableCell instance knows what TableRow it exists in.

A note about selection: A TableCell visually shows it is selected when two conditions are met:

  1. The TableSelectionModel.isSelected(int, TableColumnBase) method returns true for the row / column that this cell represents, and
  2. The cell selection mode property is set to true (to represent that it is allowable to select individual cells (and not just rows of cells)).
Since:
JavaFX 2.0
See Also:
  • Property Details

  • Constructor Details

    • TableCell

      public TableCell()
      Constructs a default TableCell instance with a style class of 'table-cell'
  • Method Details

    • tableColumnProperty

      public final ReadOnlyObjectProperty<TableColumn<S,T>> tableColumnProperty()
      The TableColumn instance that backs this TableCell.
      See Also:
    • getTableColumn

      public final TableColumn<S,T> getTableColumn()
      Gets the value of the property tableColumn.
      Property description:
      The TableColumn instance that backs this TableCell.
    • getTableView

      public final TableView<S> getTableView()
      Gets the value of the property tableView.
      Property description:
      The TableView associated with this TableCell.
    • tableViewProperty

      public final ReadOnlyObjectProperty<TableView<S>> tableViewProperty()
      The TableView associated with this TableCell.
      See Also:
    • getTableRow

      public final TableRow<S> getTableRow()
      Gets the value of the property tableRow.
      Property description:
      The TableRow that this TableCell currently finds itself placed within. The TableRow may be null early in the TableCell lifecycle, in the period between the TableCell being instantiated and being set into an owner TableRow.
    • tableRowProperty

      public final ReadOnlyObjectProperty<TableRow<S>> tableRowProperty()
      The TableRow that this TableCell currently finds itself placed within. The TableRow may be null early in the TableCell lifecycle, in the period between the TableCell being instantiated and being set into an owner TableRow.
      See Also:
    • updateTableView

      public final void updateTableView(TableView 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 - the TableView associated with this TableCell
    • updateTableRow

      public final void updateTableRow(TableRow tableRow)
      Updates the TableRow associated with this TableCell. 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:
      tableRow - the TableRow associated with this TableCell
    • updateTableColumn

      public final void updateTableColumn(TableColumn col)
      Updates the TableColumn associated with this TableCell. 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:
      col - the TableColumn associated with this TableCell