1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package Launchers;
21
22 import Controllers.ReportsController;
23 import Utilities.LogToFile;
24 import Utilities.Severity;
25 import javafx.fxml.FXMLLoader;
26 import javafx.scene.Scene;
27 import javafx.stage.Modality;
28 import javafx.stage.Stage;
29 import javafx.stage.Window;
30
31 import java.io.IOException;
32
33
34
35
36 public class Reports extends Window {
37
38 public Reports(Window owner) {
39 Stage stage = new Stage();
40 FXMLLoader loader;
41
42 Scene root;
43 try {
44 loader = new FXMLLoader(getClass().getResource("/UI/Reports.fxml"));
45 root = new Scene(loader.load());
46 ReportsController reportsController = loader.getController();
47 reportsController.initUI(this);
48 stage.setScene(root);
49 stage.setTitle("Reports");
50 stage.initModality(Modality.APPLICATION_MODAL);
51 stage.initOwner(owner);
52 stage.setMinWidth(415);
53 stage.setMinHeight(491);
54 stage.showAndWait();
55 } catch (IOException e) {
56 LogToFile.log(e, Severity.SEVERE, "Error loading window. Please retry then reinstall application. If error persists, contact the developers.");
57 }
58
59 }
60
61 }