MCPcopy Create free account
hub / github.com/Nurtak/ObjectGraphVisualization / setupStage

Method setupStage

src/ch/hsr/ogv/StageBuilder.java:96–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

StageBuilderMethod · 0.95

Calls 11

getResourcePathMethod · 0.95
setMinWidthMethod · 0.80
setMinHeightMethod · 0.80
getCenterMethod · 0.80
getSubSceneMethod · 0.80
widthPropertyMethod · 0.80
requestFocusMethod · 0.65
addMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45
heightPropertyMethod · 0.45

Tested by

no test coverage detected