Skip to content

Commit

Permalink
ParallelAnimation
Browse files Browse the repository at this point in the history
  • Loading branch information
Typhon0 committed Dec 17, 2018
1 parent b61a7b1 commit 2724468
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 159 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ Please see [CONTRIBUTING.md](https://github.com/Typhon0/AnimateFX/blob/master/C

# Credits

Animations are inspired from awesome project [Animate.css](https://github.com/daneden/animate.css)
Animations are inspired from the awesome project [Animate.css](https://github.com/daneden/animate.css)
16 changes: 6 additions & 10 deletions animatefx-demo/src/main/java/animatefx/demo/Controller.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package animatefx.demo;

import animatefx.animation.*;
import animatefx.util.ParallelAnimationFX;
import animatefx.util.SequentialAnimationFX;
import javafx.animation.Animation;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.geometry.Insets;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.CornerRadii;
import javafx.scene.paint.Color;
import javafx.util.Duration;

Expand Down Expand Up @@ -367,14 +362,15 @@ public void handleClick(ActionEvent actionEvent) {
.play();

break;

case "SequentialAnimation":
SequentialAnimationFX sequentialAnimationFX = new SequentialAnimationFX(text, new BounceIn(), new BounceOut());
SequentialAnimationFX sequentialAnimationFX = new SequentialAnimationFX(text, new BounceIn(), new Flash());
sequentialAnimationFX.setResetOnFinished(true);
sequentialAnimationFX.play();

break;

case "ParallelAnimation":
ParallelAnimationFX parallelAnimationFX = new ParallelAnimationFX(text, new BounceIn(), new Flash());
parallelAnimationFX.play();
break;
default:
System.err.println("No animation binded to this button");
break;
Expand Down
Loading

0 comments on commit 2724468

Please sign in to comment.