use of io.github.vocabhunter.gui.view.SessionViewTool in project VocabHunter by VocabHunter.
the class SessionStateHandler method addSession.
public SessionModel addSession(final SessionState state) {
SessionViewTool viewTool = new SessionViewTool();
SessionModelTool sessionTool = new SessionModelTool(state, model.getFilterSettings(), viewTool.selectedProperty(), settingsManager.getWindowSettings().orElseGet(WindowSettings::new));
SessionModel sessionModel = sessionTool.buildModel();
ControllerAndView<SessionController, Node> cav = sessionProvider.get();
SessionController controller = cav.getController();
controller.initialise(guiTaskHandler, sessionModel);
viewTool.setTabContent(SessionTab.ANALYSIS, cav.getView());
viewTool.setTabContent(SessionTab.PROGRESS, progressView(sessionModel));
mainBorderPane.setCenter(viewTool.getView());
sessionActions = controller.getSessionActions();
return sessionModel;
}
Aggregations