MCPcopy Create free account
hub / github.com/PCGen/pcgen / showAsStage

Method showAsStage

code/src/java/pcgen/gui3/PanelFromResource.java:67–88  ·  view source on GitHub ↗

Displays the loaded FXML resource as a new JavaFX stage. @param title The title of the stage to be displayed. @throws IllegalStateException if this method is called outside the JavaFX application thread.

(String title)

Source from the content-addressed store, hash-verified

65 * @throws IllegalStateException if this method is called outside the JavaFX application thread.
66 */
67 public void showAsStage(String title)
68 {
69 GuiAssertions.assertIsJavaFXThread();
70
71 try
72 {
73 // Load the scene from the FXML resource.
74 Scene scene = fxmlLoader.load();
75
76 // Create and configure a new stage.
77 Stage stage = new Stage();
78 stage.setTitle(title);
79 stage.setScene(scene);
80 stage.sizeToScene();
81 stage.show();
82 } catch (IOException e)
83 {
84 LOG.log(Level.SEVERE,
85 MessageFormat.format("Failed to load stream fxml from location {0})", fxmlLoader.getLocation()),
86 e);
87 }
88 }
89}

Callers 2

showTipsOfTheDayMethod · 0.95
actionPerformedMethod · 0.45

Calls 7

assertIsJavaFXThreadMethod · 0.95
formatMethod · 0.80
setTitleMethod · 0.65
getLocationMethod · 0.65
loadMethod · 0.45
showMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected