use of io.github.vocabhunter.analysis.grid.TextGrid in project VocabHunter by VocabHunter.
the class FilterGridController method buildFilterModel.
@Override
protected FilterGridModel buildFilterModel(final FilterFileModel model) {
Path file = model.getFile();
FilterFileMode mode = model.getMode();
TextGrid grid = readGrid(file, mode);
return new FilterGridModel(file, grid, mode, model.getColumns());
}
use of io.github.vocabhunter.analysis.grid.TextGrid in project VocabHunter by VocabHunter.
the class FilterGridController method changeFile.
@Override
protected void changeFile(final Stage stage, final FileDialogueFactory factory, final FilterGridModel filterModel) {
FileDialogue dialogue = factory.create(FileDialogueType.OPEN_WORD_LIST, stage);
dialogue.showChooser();
if (dialogue.isFileSelected()) {
Path file = dialogue.getSelectedFile();
FileFormatType format = dialogue.getFileFormatType();
FilterFileMode mode = FileFormatTypeTool.getMode(format);
TextGrid grid = readGrid(file, mode);
unbindCheckboxes(filterModel);
filterModel.replaceContent(file, grid, mode, FilterGridModel.DEFAULT_COLUMNS);
setupColumnsAndCheckBoxes(filterModel);
}
}
Aggregations