-
Bug
-
Resolution: Fixed
-
P3
-
8
-
windows 7
//first cycle of animation is different with other cycles.
//r2 stays right after first cycle
public class Bug extends Application {
@Override
public void start(Stage primaryStage) {
final SequentialTransition all = new SequentialTransition();
Rectangle r1 = new Rectangle(50, 50, Color.RED);
Rectangle r2 = new Rectangle(50, 50, Color.BLUE);
StackPane root = new StackPane();
root.getChildren().add(r1);
root.getChildren().add(r2);
TranslateTransition r1A = TranslateTransitionBuilder.create().node(r1).fromX(0).toX(150).duration(Duration.seconds(5)).build();
TranslateTransition r2A = TranslateTransitionBuilder.create().node(r2).fromX(0).toX(150).duration(Duration.seconds(5)).build();
all.getChildren().addAll(r1A, r2A);
all.setCycleCount(3);
all.play();
Scene scene = new Scene(root, 500, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
//r2 stays right after first cycle
public class Bug extends Application {
@Override
public void start(Stage primaryStage) {
final SequentialTransition all = new SequentialTransition();
Rectangle r1 = new Rectangle(50, 50, Color.RED);
Rectangle r2 = new Rectangle(50, 50, Color.BLUE);
StackPane root = new StackPane();
root.getChildren().add(r1);
root.getChildren().add(r2);
TranslateTransition r1A = TranslateTransitionBuilder.create().node(r1).fromX(0).toX(150).duration(Duration.seconds(5)).build();
TranslateTransition r2A = TranslateTransitionBuilder.create().node(r2).fromX(0).toX(150).duration(Duration.seconds(5)).build();
all.getChildren().addAll(r1A, r2A);
all.setCycleCount(3);
all.play();
Scene scene = new Scene(root, 500, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
- is blocked by
-
JDK-8116232 Consider rewriting Animation, Transition and Timeline to avoid hacks in SequenceTransition and ParallelTransition
-
- Closed
-