Search in sources :

Example 1 with ControllerAndView

use of io.github.vocabhunter.gui.common.ControllerAndView in project VocabHunter by VocabHunter.

the class ProgressProvider method get.

@Override
public ControllerAndView<ProgressController, Node> get() {
    FXMLLoader loader = loaderProvider.get();
    Node root = ViewFxml.PROGRESS.loadNode(loader);
    ProgressController controller = loader.getController();
    return new ControllerAndView<>(controller, root);
}
Also used : Node(javafx.scene.Node) ControllerAndView(io.github.vocabhunter.gui.common.ControllerAndView) FXMLLoader(javafx.fxml.FXMLLoader)

Example 2 with ControllerAndView

use of io.github.vocabhunter.gui.common.ControllerAndView in project VocabHunter by VocabHunter.

the class SessionProvider method get.

@Override
public ControllerAndView<SessionController, Node> get() {
    FXMLLoader loader = loaderProvider.get();
    Node root = ViewFxml.SESSION.loadNode(loader);
    SessionController controller = loader.getController();
    return new ControllerAndView<>(controller, root);
}
Also used : Node(javafx.scene.Node) ControllerAndView(io.github.vocabhunter.gui.common.ControllerAndView) FXMLLoader(javafx.fxml.FXMLLoader)

Example 3 with ControllerAndView

use of io.github.vocabhunter.gui.common.ControllerAndView in project VocabHunter by VocabHunter.

the class FxmlHandler method loadControllerAndView.

public <C, V extends Node> ControllerAndView<C, V> loadControllerAndView(final ViewFxml fxml) {
    FXMLLoader loader = loaderProvider.get();
    V view = loadNode(loader, fxml);
    C controller = loader.getController();
    return new ControllerAndView<>(controller, view);
}
Also used : ControllerAndView(io.github.vocabhunter.gui.common.ControllerAndView) FXMLLoader(javafx.fxml.FXMLLoader)

Aggregations

ControllerAndView (io.github.vocabhunter.gui.common.ControllerAndView)3 FXMLLoader (javafx.fxml.FXMLLoader)3 Node (javafx.scene.Node)2