Search in sources :

Example 1 with FilterGridWordTableCell

use of io.github.vocabhunter.gui.view.FilterGridWordTableCell 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;
}
Also used : GridLine(io.github.vocabhunter.analysis.grid.GridLine) FilterGridWordTableCell(io.github.vocabhunter.gui.view.FilterGridWordTableCell) TableColumn(javafx.scene.control.TableColumn) GridCell(io.github.vocabhunter.analysis.grid.GridCell)

Aggregations

GridCell (io.github.vocabhunter.analysis.grid.GridCell)1 GridLine (io.github.vocabhunter.analysis.grid.GridLine)1 FilterGridWordTableCell (io.github.vocabhunter.gui.view.FilterGridWordTableCell)1 TableColumn (javafx.scene.control.TableColumn)1