(Stage parentStage)
| 43 | private final Stage primaryStage; |
| 44 | |
| 45 | public AboutDialog(Stage parentStage) |
| 46 | { |
| 47 | this.primaryStage = parentStage; |
| 48 | |
| 49 | loader.setResources(LanguageBundle.getBundle()); |
| 50 | loader.setLocation(getClass().getResource("AboutDialog.fxml")); |
| 51 | |
| 52 | final Scene scene; |
| 53 | try |
| 54 | { |
| 55 | scene = loader.load(); |
| 56 | scene.addEventHandler(KeyEvent.KEY_PRESSED, keyEvent -> { |
| 57 | if (keyEvent.getCode()== KeyCode.ESCAPE) |
| 58 | { |
| 59 | primaryStage.hide(); |
| 60 | } |
| 61 | }); |
| 62 | } catch (IOException e) |
| 63 | { |
| 64 | Logging.errorPrint("failed to load preloader", e); |
| 65 | return; |
| 66 | } |
| 67 | |
| 68 | primaryStage.setScene(scene); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * @return the controller for the preloader |
nothing calls this directly
no test coverage detected