use of org.phoenicis.javafx.controller.MainController in project POL-POM-5 by PlayOnLinux.
the class JavaFXApplication method start.
@Override
public void start(Stage primaryStage) {
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("views/common/phoenicis.png")));
primaryStage.setTitle("Phoenicis");
loadFonts();
ConfigurableApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfiguration.class);
final MainController mainController = applicationContext.getBean(MainController.class);
mainController.show();
mainController.setOnClose(() -> {
applicationContext.getBean(ControlledThreadPoolExecutorServiceCloser.class).setCloseImmediately(true);
applicationContext.close();
});
}
Aggregations