/** * set the dialog container Note: the dialog container must be StackPane, its the container for * the dialog to be shown in. * * @param dialogContainer */ public void setDialogContainer(StackPane dialogContainer) { if (dialogContainer != null) { this.dialogContainer = dialogContainer; if (this.getChildren().indexOf(overlayPane) == -1) this.getChildren().setAll(overlayPane); this.visibleProperty().unbind(); this.visibleProperty().bind(overlayPane.visibleProperty()); if (this.dialogContainer.getChildren().indexOf(this) == -1 || this.dialogContainer.getChildren().indexOf(this) != this.dialogContainer.getChildren().size() - 1) { this.dialogContainer.getChildren().remove(this); this.dialogContainer.getChildren().add(this); } // FIXME: need to be improved to consider only the parent boundary offsetX = (this.getParent().getBoundsInLocal().getWidth()); offsetY = (this.getParent().getBoundsInLocal().getHeight()); animation = getShowAnimation(transitionType.get()); } }