Package javafx.stage

Examples of javafx.stage.Stage


                };
            }
        };
        service.runningProperty().addListener((ObservableValue<? extends Boolean> value, Boolean oldValue, Boolean newValue) -> {
            if (!newValue) {
                Stage stage = new Stage();
                service.getValue().show(stage);
                from_scene.dispose();
            }
        });
        service.start();
View Full Code Here


                                };
                            }
                        });
                        listView.getItems().setAll(fxForm.getConstraintViolations());
                        Scene scene = new Scene(listView);
                        Stage stage = new Stage();
                        stage.setScene(scene);
                        stage.show();
                    }
                }).build();
    }
View Full Code Here

        return this;
    }

    @Override
    public Stage build() {
        stage = new Stage();

        Scene scene = SceneBuilder.create()
                .width(400)
                .height(200)
                .root(
View Full Code Here

          flowPane.getChildren().add(btn);
          flowPane.setPrefHeight(100);
         
          Scene scene = new Scene(flowPane);
         
          Stage stage = new Stage(StageStyle.UTILITY);
          stage.setTitle("Hello there");
          stage.initModality(Modality.APPLICATION_MODAL);
          stage.setScene(scene);
          stage.sizeToScene();
          stage.showAndWait();
        }
      })
      .start();
  }
View Full Code Here

    /**
     * Displays a modal dialog in a JavaFX context with the specified parent.
     * @param parent Parent of the dialog, used to center the dialog. May be null.
     */
    public void showModal(final Node parent) {
      Stage stage = new Stage();
      stage.setScene(new Scene(pane));     
      stage.initModality(Modality.APPLICATION_MODAL);
      stage.setTitle(title);
     
      // We need to apply the size after the stage is visible, otherwise we won't get any
      // usable preferred size information.
      stage.setOnShown(new EventHandler<WindowEvent>() {
        @Override
        public void handle(WindowEvent ev) {
          sizeReasonably((Stage) ev.getSource(), parent);
        }
      });

      stage.showAndWait();
    }
View Full Code Here

        public void init(final Stage primaryStage) {
          btnRunTask.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent ev) {
              Pane pane = createExecutorPane(Long.toString(System.currentTimeMillis()));
              Stage dialog = new Stage();
              dialog.initOwner(primaryStage);
              //dialog.initModality(Modality.);
              Scene scene = new Scene(pane);
              dialog.setScene(scene);
              dialog.show();
            }
          });
          pane.getChildren().add(btnRunTask);
        }
      });
View Full Code Here

 
  public void showView(Stage primaryStage) {
    if(dialogStage==null) {
      Parent root = (Parent) TestApplication.loader.load("/search.fxml");
      Scene scene = new Scene(root, 768, 480);
      dialogStage = new Stage();
      dialogStage.initOwner(primaryStage);
      dialogStage.initModality(Modality.WINDOW_MODAL);
      dialogStage.setScene(scene);
      dialogStage.setTitle("JavaFX Spring Demo");
    }
View Full Code Here

  }

  public void showView(Stage mainStage) {
    if (dialogStage == null) {
      AnchorPane root = (AnchorPane) TestApplication.loader.load("/login.fxml");
      dialogStage = new Stage();
      dialogStage.initOwner(mainStage);
      dialogStage.initModality(Modality.WINDOW_MODAL);
      Scene scene = new Scene(root);
      dialogStage.setScene(scene);
      dialogStage.setResizable(false);
View Full Code Here

        invisibleTwin = new Button("Twin");
        invisibleTwin.setId("twin");
        invisibleTwin.setVisible(false);
        twinPane.getChildren().setAll(invisibleTwin, visibleTwin);

        window = new Stage();
        window.setTitle("window");
        window.setScene(new Scene(pane, 600, 400));
        otherWindow = new Stage();
        otherWindow.setTitle("otherWindow");
        otherWindow.setScene(new Scene(otherPane, 600, 400));
        twinWindow = new Stage();
        twinWindow.setTitle("twinWindow");
        twinWindow.setScene(new Scene(twinPane, 600, 400));
        window.show();
        otherWindow.show();
        twinWindow.show();
View Full Code Here

            }
        });
    }

    public static void setupStagesClass() {
        window = new Stage();
        window.setTitle("window");

        windowInWindow = new Stage();
        windowInWindow.setTitle("windowInWindow");
        windowInWindow.initOwner(window);

        windowInWindowInWindow = new Stage();
        windowInWindowInWindow.setTitle("windowInWindowInWindow");
        windowInWindowInWindow.initOwner(windowInWindow);

        otherWindow = new Stage();
        otherWindow.setTitle("otherWindow");
        scene = new Scene(new Region(), 600, 400);
        otherWindow.setScene(scene);

        window.show();
View Full Code Here

TOP

Related Classes of javafx.stage.Stage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.