/** * play the hide animation for the dialog, as the java hide method is set to final * so it can not be overridden */ public void hideWithAnimation() { if (transition == null || transition.getStatus().equals(Animation.Status.STOPPED)) { JFXAlertAnimation currentAnimation = getCurrentAnimation(); Animation animation = currentAnimation.createHidingAnimation(getDialogPane().getContent(), getDialogPane()); if (animation != null) { transition = animation; animation.setOnFinished(finish -> { animateClosing = false; hide(); transition = null; }); animation.play(); } else { animateClosing = false; transition = null; Platform.runLater(this::hide); } } }
JFXAlertAnimation currentAnimation = getCurrentAnimation(); currentAnimation.initAnimation(contentContainer.getParent(), dialogPane); }); JFXAlertAnimation currentAnimation = getCurrentAnimation(); Animation animation = currentAnimation.createShowingAnimation(dialogPane.getContent(), dialogPane); if (animation != null) {
/** * play the hide animation for the dialog, as the java hide method is set to final * so it can not be overridden */ public void hideWithAnimation() { if (transition == null || transition.getStatus().equals(Animation.Status.STOPPED)) { JFXAlertAnimation currentAnimation = getCurrentAnimation(); Animation animation = currentAnimation.createHidingAnimation(getDialogPane().getContent(), getDialogPane()); if (animation != null) { transition = animation; animation.setOnFinished(finish -> { animateClosing = false; hide(); transition = null; }); animation.play(); } else { animateClosing = false; transition = null; Platform.runLater(this::hide); } } }
JFXAlertAnimation currentAnimation = getCurrentAnimation(); currentAnimation.initAnimation(contentContainer.getParent(), dialogPane); }); JFXAlertAnimation currentAnimation = getCurrentAnimation(); Animation animation = currentAnimation.createShowingAnimation(dialogPane.getContent(), dialogPane); if (animation != null) {