changeset 43:6a2624036241

missed class
author Alexandre (Shura) Iline <alexandre.iline@sun.com>
date Wed, 27 Jun 2012 17:07:18 +0400
parents be861684d20d
children 4023a2c07664 a38035938aad
files tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/Jemmy/JemmyFX/samples/org/jemmy/samples/SampleBase.java	Wed Jun 27 17:07:18 2012 +0400
@@ -0,0 +1,29 @@
+package org.jemmy.samples;
+
+import javafx.application.Application;
+import org.jemmy.fx.AppExecutor;
+import org.jemmy.input.AWTRobotInputFactory;
+
+
+/**
+ *
+ * @author shura
+ */
+public class SampleBase {
+    
+    private static final String osName = System.getProperty("os.name").toLowerCase();;
+
+    static {
+        if(osName.contains("mac os")) {
+            AWTRobotInputFactory.runInOtherJVM(true);
+        }
+    }
+    
+    protected static void startApp(Class<? extends Application> app) throws InterruptedException {
+        AppExecutor.executeNoBlock(app);
+        if(osName.contains("mac os")) {
+            Thread.sleep(1000);
+        }
+    }
+    
+}