changeset 2834:90056a34a341

Backout accidentally committed change to StubToolkit
author Richard Bair <richard.bair@oracle.com>
date Mon, 11 Mar 2013 10:09:12 -0700
parents c77fa8b03077
children 26c3a8370c80
files test-stub-toolkit/src/com/sun/javafx/pgstub/StubToolkit.java
diffstat 1 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubToolkit.java	Mon Mar 11 09:58:45 2013 -0700
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubToolkit.java	Mon Mar 11 10:09:12 2013 -0700
@@ -755,18 +755,27 @@
                                           .contains((int) x, (int) y);
     }
 
+    public void setCurrentTime(long millis) {
+        masterTimer.setCurrentTime(millis);
+    }
+
+    public void handleAnimation() {
+        if (animationRunnable != null) {
+            try {
+                animationRunnable.run();
+            } catch (Throwable t) {
+                t.printStackTrace();
+            }
+        }
+    }
+
     public StubImageLoaderFactory getImageLoaderFactory() {
         return imageLoaderFactory;
     }
 
-    public void resetAnimationEngine() {
-        animationRunnable = null;
-        masterTimer = new StubMasterTimer();
-    }
-
     public void setAnimationTime(final long millis) {
-        masterTimer.setCurrentTime(millis);
-        if (animationRunnable != null) animationRunnable.run();
+        setCurrentTime(millis);
+        handleAnimation();
         fireTestPulse();
     }