Search in sources :

Example 1 with SessionViewTool

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;
}
Also used : SessionModel(io.github.vocabhunter.gui.model.SessionModel) Node(javafx.scene.Node) SessionViewTool(io.github.vocabhunter.gui.view.SessionViewTool)

Aggregations

SessionModel (io.github.vocabhunter.gui.model.SessionModel)1 SessionViewTool (io.github.vocabhunter.gui.view.SessionViewTool)1 Node (javafx.scene.Node)1