BakeoutController  0.1
A Controller for the Omicron vacuum chamber
UserInterfaceConfiguration.java
1 package ui;
2 
3 import javafx.scene.Parent;
4 import javafx.scene.Scene;
5 import javafx.stage.Stage;
6 import org.springframework.context.annotation.*;
11 
28 @Configuration
29 @Lazy
34  private Stage primaryStage;
35 
39  public void setPrimaryStage(Stage primaryStage) {
40  this.primaryStage = primaryStage;
41  }
42 
47  public void showScreen(Parent screen){
48  primaryStage.setScene(new Scene(screen, 500, 400));
49  primaryStage.show();
50  }
51 
55  @Bean
56  @Scope("prototype")
58  return new ContextAwareFXMLLoader();
59  }
60 
61  @Bean
62  @Scope("prototype")
63  public DevicesController devicesController(){
64  return new DevicesController();
65  }
66 
67  @Bean
68  @Scope("prototype")
69  public SequenceController sequenceController(){
70  return new SequenceController();
71  }
72 
73  @Bean
74  @Scope("prototype")
75  public NewDeviceController newDeviceController(){
76  return new NewDeviceController();
77  }
78 
79  @Bean
80  @Scope("prototype")
81  public NewStepController newStepController(){
82  return new NewStepController();
83  }
84 
88  @Bean
89  @Scope("singleton")
91  return new AutowiredFXMLStage(
92  getClass().getResource("/Application.fxml"),
93  primaryStage
94  );
95  }
96 
97 
98 }
Git Repo