()
| 94 | } |
| 95 | |
| 96 | private void setupStage() { |
| 97 | this.primaryStage.setTitle(this.appTitle); |
| 98 | this.primaryStage.setMinWidth(MIN_WIDTH); |
| 99 | this.primaryStage.setMinHeight(MIN_HEIGHT); |
| 100 | this.primaryStage.getIcons().add(new Image(ResourceLocator.getResourcePath(Resource.ICON_GIF).toExternalForm())); // set the application icon |
| 101 | |
| 102 | Pane canvas = (Pane) this.rootLayout.getCenter(); |
| 103 | this.subSceneAdapter = new SubSceneAdapter(canvas.getWidth(), canvas.getHeight()); |
| 104 | SubScene subScene = this.subSceneAdapter.getSubScene(); |
| 105 | canvas.getChildren().add(subScene); |
| 106 | subScene.widthProperty().bind(canvas.widthProperty()); |
| 107 | subScene.heightProperty().bind(canvas.heightProperty()); |
| 108 | |
| 109 | Scene scene = new Scene(this.rootLayout); |
| 110 | String sceneCSS = ResourceLocator.getResourcePath(Resource.SCENE_CSS).toExternalForm(); |
| 111 | scene.getStylesheets().add(sceneCSS); |
| 112 | this.primaryStage.setScene(scene); |
| 113 | this.primaryStage.show(); |
| 114 | this.subSceneAdapter.getSubScene().requestFocus(); |
| 115 | } |
| 116 | |
| 117 | private void loadRootLayout() { |
| 118 | FXMLLoader loader = FXMLResourceUtil.prepareLoader(Resource.ROOTLAYOUT_FXML); // load rootlayout from fxml file |
no test coverage detected