... rotateTransition.setAutoReverse(true);
62
63         // transition that moves a node along a Path
64         Path path = new Path(new MoveTo(45, 45), new LineTo(45, 0),
65            new LineTo(90, 0), new LineTo(90, 90), new LineTo(0, 90));
66         PathTransition translateTransition =
67            new PathTransition(Duration.seconds(2), path);
68         translateTransition.setCycleCount(2);
69         translateTransition.setInterpolator(Interpolator.EASE_IN);
70         translateTransition.setAutoReverse(true);
71
72         // transition that scales a shape to make it larger or smaller
73         ScaleTransition scaleTransition =
74            new ScaleTransition(Duration.seconds(1));
75         scaleTransition.setByX(0.75);
76         scaleTransition.setByY(0.75);
77         scaleTransition.setCycleCount(2);
78         scaleTransition.setInterpolator(Interpolator.EASE_OUT ...

Get Java How To Program, Late Objects, 11th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.