use of javafx.animation.Animation 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 javafx.animation.Animation in project FXyzLib by Birdasaur.
the class CameraController method setCamera.
public void setCamera(AdvancedCamera camera) {
this.camera = camera;
switch(animPref) {
case TIMELINE:
timeline.getKeyFrames().addAll(new KeyFrame(Duration.millis(15), e -> {
new Timeline(new KeyFrame[] { new KeyFrame(Duration.ONE, ev -> {
update();
}) }).play();
}));
timeline.play();
break;
case TIMER:
timer.start();
break;
case TRANSITION:
transition.play();
break;
case ANIMATION:
break;
}
}
use of javafx.animation.Animation in project JFoenix by jfoenixadmin.
the class JFXNodesAnimation method animate.
public void animate() {
init();
Animation exitAnimation = animateExit();
Animation sharedAnimation = animateSharedNodes();
Animation entranceAnimation = animateEntrance();
exitAnimation.setOnFinished(finish -> sharedAnimation.play());
sharedAnimation.setOnFinished(finish -> entranceAnimation.play());
entranceAnimation.setOnFinished(finish -> end());
exitAnimation.play();
}
Aggregations