19 package org.sleuthkit.autopsy.timeline.ui;
21 import java.util.function.Supplier;
22 import javafx.scene.control.IndexedCell;
23 import javafx.scene.control.ListCell;
24 import javafx.scene.control.TableCell;
25 import javafx.scene.control.TableColumn;
26 import javafx.scene.control.TreeTableCell;
27 import javafx.scene.control.TreeTableColumn;
38 public TreeTableCell< X, Y>
forTreeTable(TreeTableColumn< X, Y> column) {
39 return new AbstractTreeTableCell();
42 public TableCell<X, Y>
forTable(TableColumn<X, Y> column) {
43 return new AbstractTableCell();
47 return new AbstractListCell();
50 protected abstract void configureCell(IndexedCell<? extends Y> cell, Y item,
boolean empty, Supplier<X> supplier);
55 @SuppressWarnings({
"unchecked"})
57 super.updateItem(item, empty);
58 configureCell(
this, item, empty, (() -> (X) this.getTableRow().getItem()));
66 super.updateItem(item, empty);
67 configureCell(
this, item, empty, (() -> this.getTreeTableRow().getItem()));
74 @SuppressWarnings(
"unchecked")
76 super.updateItem(item, empty);
void updateItem(Y item, boolean empty)
TableCell< X, Y > forTable(TableColumn< X, Y > column)
abstract void configureCell(IndexedCell<?extends Y > cell, Y item, boolean empty, Supplier< X > supplier)
TreeTableCell< X, Y > forTreeTable(TreeTableColumn< X, Y > column)
void updateItem(Y item, boolean empty)
void updateItem(Y item, boolean empty)