use of com.jfoenix.animation.alert.JFXAlertAnimation in project JFoenix by jfoenixadmin.
the class JFXAlert method hideWithAnimation.
/**
* 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);
}
}
}
use of com.jfoenix.animation.alert.JFXAlertAnimation in project JFoenix by jfoenixadmin.
the class JFXAlert method getCurrentAnimation.
// this method ensure not null value for current animation
private JFXAlertAnimation getCurrentAnimation() {
JFXAlertAnimation usedAnimation = getAnimation();
usedAnimation = usedAnimation == null ? JFXAlertAnimation.NO_ANIMATION : usedAnimation;
return usedAnimation;
}
Aggregations