use of io.github.vocabhunter.analysis.grid.GridCell in project VocabHunter by VocabHunter.
the class FilterGridController method buildColumn.
private TableColumn<GridLine, GridCell> buildColumn(final FilterGridModel filterModel, final int index) {
TableColumn<GridLine, GridCell> column = new TableColumn<>(ColumnNameTool.columnName(index));
column.setSortable(false);
column.setCellValueFactory(features -> extractValue(features, index));
column.setCellFactory(c -> new FilterGridWordTableCell(filterModel.getColumnSelections().get(index)));
if (isScrollableColumnList(filterModel)) {
column.setPrefWidth(PREFERRED_COLUMN_WIDTH);
}
return column;
}
use of io.github.vocabhunter.analysis.grid.GridCell in project VocabHunter by VocabHunter.
the class FilterGridController method extractValue.
private ObservableValue<GridCell> extractValue(final CellDataFeatures<GridLine, GridCell> features, final int index) {
List<GridCell> cells = features.getValue().getCells();
GridCell cell = getCell(cells, index);
return cellCache.computeIfAbsent(cell, ReadOnlyObjectWrapper::new);
}
Aggregations