BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
JavaFXGraphicalUserInterfaceLauncher.java
1 package ui;
2 
3 import javafx.application.Application;
4 import javafx.stage.Stage;
6 import org.springframework.context.ApplicationContext;
7 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
8 
12 public class JavaFXGraphicalUserInterfaceLauncher extends Application
13  implements UserInterfaceLauncher {
14  private final ApplicationContext context;
15 
20  context = new AnnotationConfigApplicationContext(
22  );
23  }
24 
25  public JavaFXGraphicalUserInterfaceLauncher(ApplicationContext context){
26  this.context = context;
27  }
28 
35  @Override
36  public void start(Stage stage) throws Exception {
37 
38  UserInterfaceConfiguration userInterface = context.getBean(
40  );
41 
42  userInterface.setPrimaryStage(stage);
43  userInterface.application().loadFXML();
44  userInterface.application().show();
45  }
46 
53  @Override
54  public void launchWithDefaultStage(String[] commandLineArguments){
55  launch(this.getClass(), commandLineArguments);
56  }
57 }
void loadFXML()
Git Repo