Search in sources :

Example 61 with KeyValue

use of javafx.animation.KeyValue in project fxexperience2 by EricCanull.

the class FadeOutUpBigTransition method starting.

@Override
protected void starting() {
    double endY = -node.localToScene(0, 0).getY() - node.getBoundsInParent().getHeight();
    timeline = new Timeline(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateYProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateYProperty(), endY, WEB_EASE)));
    super.starting();
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) KeyFrame(javafx.animation.KeyFrame)

Example 62 with KeyValue

use of javafx.animation.KeyValue in project fxexperience2 by EricCanull.

the class RollOutTransition method starting.

@Override
protected void starting() {
    super.starting();
    timeline = new Timeline(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 0, WEB_EASE), new KeyValue(node.rotateProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), node.getBoundsInLocal().getWidth(), WEB_EASE), new KeyValue(node.rotateProperty(), 120, WEB_EASE)));
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) KeyFrame(javafx.animation.KeyFrame)

Example 63 with KeyValue

use of javafx.animation.KeyValue in project fxexperience2 by EricCanull.

the class RotateInDownRightTransition method starting.

@Override
protected void starting() {
    super.starting();
    rotate = new Rotate(0, node.getBoundsInLocal().getWidth(), node.getBoundsInLocal().getHeight());
    timeline = new Timeline(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE)));
    node.getTransforms().add(rotate);
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) Rotate(javafx.scene.transform.Rotate) KeyFrame(javafx.animation.KeyFrame)

Example 64 with KeyValue

use of javafx.animation.KeyValue in project fxexperience2 by EricCanull.

the class RotateInUpLeftTransition method starting.

@Override
protected void starting() {
    super.starting();
    rotate = new Rotate(0, 0, node.getBoundsInLocal().getHeight());
    timeline = new Timeline(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE)));
    node.getTransforms().add(rotate);
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) Rotate(javafx.scene.transform.Rotate) KeyFrame(javafx.animation.KeyFrame)

Example 65 with KeyValue

use of javafx.animation.KeyValue in project fxexperience2 by EricCanull.

the class RotateOutDownLeftTransition method starting.

@Override
protected void starting() {
    super.starting();
    rotate = new Rotate(0, 0, node.getBoundsInLocal().getHeight());
    timeline = new Timeline(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(rotate.angleProperty(), 0, WEB_EASE)), new KeyFrame(Duration.millis(1000), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(rotate.angleProperty(), 90, WEB_EASE)));
    node.getTransforms().add(rotate);
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) Rotate(javafx.scene.transform.Rotate) KeyFrame(javafx.animation.KeyFrame)

Aggregations

KeyValue (javafx.animation.KeyValue)85 KeyFrame (javafx.animation.KeyFrame)83 Timeline (javafx.animation.Timeline)82 Interpolator (javafx.animation.Interpolator)12 Rotate (javafx.scene.transform.Rotate)12 Duration (javafx.util.Duration)12 Insets (javafx.geometry.Insets)11 MouseEvent (javafx.scene.input.MouseEvent)10 PerspectiveCamera (javafx.scene.PerspectiveCamera)9 ArrayList (java.util.ArrayList)8 Scene (javafx.scene.Scene)7 Label (javafx.scene.control.Label)7 Rectangle (javafx.scene.shape.Rectangle)7 ActionEvent (javafx.event.ActionEvent)6 EventHandler (javafx.event.EventHandler)6 Group (javafx.scene.Group)6 Node (javafx.scene.Node)6 KeyCode (javafx.scene.input.KeyCode)6 VBox (javafx.scene.layout.VBox)6 JFXButton (com.jfoenix.controls.JFXButton)5