Search in sources :

Example 1 with MainViewController

use of eu.fthevenet.binjr.controllers.MainViewController in project selenium_java by sergueik.

the class Binjr method start.

@Override
public void start(Stage primaryStage) throws Exception {
    logger.info(() -> "Starting binjr");
    FXMLLoader loader = new FXMLLoader(getClass().getResource("/views/MainView.fxml"));
    Parent root = loader.load();
    MainViewController mainViewController = loader.getController();
    mainViewController.setParameters(getParameters());
    primaryStage.setTitle("binjr");
    StageAppearanceManager.getInstance().register(primaryStage);
    try (Profiler p = Profiler.start("Set scene", logger::trace)) {
        primaryStage.setScene(new Scene(root));
    }
    try (Profiler p = Profiler.start("show", logger::trace)) {
        primaryStage.show();
    }
    SplashScreen splash = SplashScreen.getSplashScreen();
    if (splash != null) {
        splash.close();
    }
}
Also used : MainViewController(eu.fthevenet.binjr.controllers.MainViewController) Profiler(eu.fthevenet.util.logging.Profiler) Parent(javafx.scene.Parent) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader)

Aggregations

MainViewController (eu.fthevenet.binjr.controllers.MainViewController)1 Profiler (eu.fthevenet.util.logging.Profiler)1 FXMLLoader (javafx.fxml.FXMLLoader)1 Parent (javafx.scene.Parent)1 Scene (javafx.scene.Scene)1