Examples of initOwner()


Examples of javafx.stage.Stage.initOwner()

    if (children != null) {
      root.getChildren().addAll(children);
    }
    if (parent != null) {
      stage.setScene(new Scene(root, parent.getWidth(), parent.getHeight(), Color.TRANSPARENT));
      stage.initOwner(parent);
      stage.setX(parent.getX() + parent.getScene().getWidth() / 2d - width / 2d);
      stage.setY(parent.getY() + parent.getScene().getHeight() / 2d - height / 2d);
      parent.xProperty().addListener(new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

    @Override
    public Stage get() {
        Stage dialog = new Stage(style);
        dialog.initModality(Modality.WINDOW_MODAL);
        dialog.initOwner(CustomerApp.getPrimaryStage());
        try {
            FXMLLoader loader = new FXMLLoader(fxml);
            loader.setControllerFactory(new Callback<Class<?>, Object>() {
                @Override
                public Object call(Class<?> aClass) {
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

          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();
            }
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

        primaryStage.setScene(scene);
        primaryStage.show();

        final Stage dialog = new Stage(StageStyle.TRANSPARENT);
        dialog.initModality(Modality.WINDOW_MODAL);
        dialog.initOwner(primaryStage);
        dialog.setScene(new Scene((Parent) SpringFXMLLoader.load("/fxml/login.fxml").getView()));
//        dialog.show();
    }
}
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

        Stage tableStage = new Stage();
        tableStage.setScene(new Scene(tableAnchor));
        tableStage.setTitle("Table Generator");
        tableStage.initModality(Modality.WINDOW_MODAL);
        tableStage.initOwner(scene.getWindow());

        controller.setStage(stage);
        controller.setScene(scene);
        controller.setTableAnchor(tableAnchor);
        controller.setTableStage(tableStage);
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

        Stage utilityStage = new Stage();
        utilityStage.setTitle("Stage Utility type demo");
        UndecoratorScene scene = new UndecoratorScene(utilityStage, StageStyle.UTILITY, root, null);
        utilityStage.setScene(scene);
        utilityStage.initModality(Modality.WINDOW_MODAL);
        utilityStage.initOwner(primaryStage);

        // Set sizes based on client area's sizes
        Undecorator undecorator = scene.getUndecorator();
        utilityStage.setMinWidth(undecorator.getMinWidth());
        utilityStage.setMinHeight(undecorator.getMinHeight());
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

        Stage utilityStage = new Stage();
        utilityStage.setTitle("Stage Utility type demo");
        UndecoratorScene scene = new UndecoratorScene(utilityStage, StageStyle.UTILITY, root, null);
        utilityStage.setScene(scene);
        utilityStage.initModality(Modality.WINDOW_MODAL);
        utilityStage.initOwner(primaryStage);

        // Set sizes based on client area's sizes
        Undecorator undecorator = scene.getUndecorator();
        utilityStage.setMinWidth(undecorator.getMinWidth());
        utilityStage.setMinHeight(undecorator.getMinHeight());
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

            FXMLLoader loader = new FXMLLoader(MainQuizCreator.class.getResource("view/AboutUsDialog.fxml"));
            AnchorPane page = (AnchorPane) loader.load();
            Stage dialogStage = new Stage();
            dialogStage.setTitle("About Us");
            dialogStage.initModality(Modality.WINDOW_MODAL);
            dialogStage.initOwner(primaryStage);
            Scene scene = new Scene(page);
            dialogStage.setScene(scene);
           
            AboutUsDialogController controller = loader.getController();
            controller.setDialogStage(dialogStage);
View Full Code Here

Examples of javafx.stage.Stage.initOwner()

 
  protected Stage create() {
    Stage stage = new Stage(StageStyle.UTILITY);
    stage.setTitle(title);
// Causes problems when embedded in SWT   
    stage.initOwner(parent);
    Parent content = createContents();
    Scene s = new Scene(content);
    s.getStylesheets().addAll(getStylesheets());
    stage.setScene(s);
    return stage;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.