modules/graphics/src/test/java/test/javafx/animation/SequentialTransitionPlayTest.java
Print this page
rev 9250 : 8134762: Refactor Javafx graphics module tests for clear separation of tests
Reviewed-by:
@@ -21,14 +21,20 @@
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-package javafx.animation;
+package test.javafx.animation;
import com.sun.javafx.animation.TickCalculation;
import javafx.animation.Animation.Status;
+import javafx.animation.AnimationShim;
+import javafx.animation.Interpolator;
+import javafx.animation.SequentialTransition;
+import javafx.animation.SequentialTransitionShim;
+import javafx.animation.Transition;
+import javafx.animation.TransitionShim;
import javafx.beans.property.LongProperty;
import javafx.beans.property.SimpleLongProperty;
import javafx.util.Duration;
import org.junit.Before;
import org.junit.Test;
@@ -49,23 +55,23 @@
Transition childByX2;
@Before
public void setUp() {
amt = new AbstractMasterTimerMock();
- st = new SequentialTransition(amt);
- child1X = new Transition() {
+ st = SequentialTransitionShim.getSequentialTransition(amt);
+ child1X = new TransitionShim() {
{
setCycleDuration(Duration.minutes(1));
setInterpolator(Interpolator.LINEAR);
}
@Override
protected void interpolate(double d) {
xProperty.set(Math.round(d * 60000));
}
};
- child1Y = new Transition() {
+ child1Y = new TransitionShim() {
{
setCycleDuration(Duration.seconds(10));
setInterpolator(Interpolator.LINEAR);
}
@@ -77,11 +83,11 @@
childByX = createByXChild();
childByX2 = createByXChild();
}
private Transition createByXChild() {
- return new Transition() {
+ return new TransitionShim() {
{
setCycleDuration(Duration.seconds(1));
setInterpolator(Interpolator.LINEAR);
}
@@ -91,11 +97,11 @@
protected void interpolate(double frac) {
xProperty.set(Math.round(lastX + frac * 1000));
}
@Override
- void impl_sync(boolean forceSync) {
+ public void impl_sync(boolean forceSync) {
super.impl_sync(forceSync);
if (forceSync) {
lastX = xProperty.get();
}
}