Search in sources :

Example 81 with Timeline

use of javafx.animation.Timeline 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 82 with Timeline

use of javafx.animation.Timeline 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)

Example 83 with Timeline

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

the class RotateOutUpLeftTransition 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)

Example 84 with Timeline

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

the class BounceInLeftTransition method starting.

@Override
protected void starting() {
    double startX = -node.localToScene(0, 0).getX() - node.getBoundsInParent().getWidth();
    timeline = new Timeline();
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), startX, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), 30, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), new KeyValue(node.translateXProperty(), -10, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(1000), new KeyValue(node.translateXProperty(), 0, WEB_EASE)));
    super.starting();
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) KeyFrame(javafx.animation.KeyFrame)

Example 85 with Timeline

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

the class BounceInRightTransition method starting.

@Override
protected void starting() {
    double startX = node.getScene().getWidth() - node.localToScene(0, 0).getX();
    timeline = new Timeline();
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(0), new KeyValue(node.opacityProperty(), 0, WEB_EASE), new KeyValue(node.translateXProperty(), startX, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(600), new KeyValue(node.opacityProperty(), 1, WEB_EASE), new KeyValue(node.translateXProperty(), -30, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(800), new KeyValue(node.translateXProperty(), 10, WEB_EASE)));
    timeline.getKeyFrames().add(new KeyFrame(Duration.millis(1000), new KeyValue(node.translateXProperty(), 0, WEB_EASE)));
    super.starting();
}
Also used : Timeline(javafx.animation.Timeline) KeyValue(javafx.animation.KeyValue) KeyFrame(javafx.animation.KeyFrame)

Aggregations

Timeline (javafx.animation.Timeline)111 KeyFrame (javafx.animation.KeyFrame)107 KeyValue (javafx.animation.KeyValue)81 Duration (javafx.util.Duration)32 ActionEvent (javafx.event.ActionEvent)22 JFXButton (com.jfoenix.controls.JFXButton)20 IOException (java.io.IOException)19 URL (java.net.URL)19 ResourceBundle (java.util.ResourceBundle)19 FXML (javafx.fxml.FXML)19 Initializable (javafx.fxml.Initializable)18 FXMLLoader (javafx.fxml.FXMLLoader)17 Pane (javafx.scene.layout.Pane)17 AnchorPane (javafx.scene.layout.AnchorPane)16 Level (java.util.logging.Level)15 Logger (java.util.logging.Logger)15 MouseEvent (javafx.scene.input.MouseEvent)14 Rotate (javafx.scene.transform.Rotate)14 JFXTextField (com.jfoenix.controls.JFXTextField)12 Interpolator (javafx.animation.Interpolator)12