Example #1
0
  public static void subWindow(String title, Parent parentControl) {
    Stage stage = new Stage();
    Scene scene = new Scene(parentControl);

    CloseWindowOnEscape.apply(scene, stage);

    stage.setScene(scene);
    stage.setWidth(800);
    stage.setHeight(600);
    stage.setTitle(title);

    stage.show();
  }
Example #2
0
  public static void showSourceCodeWindow(String title, String moduleSourceCode) {
    assert Platform.isFxApplicationThread();

    TextArea textArea;

    textArea = new TextArea(moduleSourceCode);
    textArea.getStyleClass().add("mod-src");
    textArea.setEditable(false);

    Scene scene = new Scene(textArea, 800, 800);
    ErlyBerly.applyCssToWIndow(scene);

    Stage primaryStage;

    primaryStage = new Stage();
    primaryStage.setTitle(title);
    primaryStage.setScene(scene);
    primaryStage.show();

    CloseWindowOnEscape.apply(scene, primaryStage);
  }