changeset 143:e0332c204b54

Add changes from internal repository up to 3457 rev.
author Aleksandr Sakharuk <aleksandr.sakharuk@oracle.com>
date Thu, 07 Feb 2013 16:36:54 +0400
parents a2ed81a050fd
children b7a5e7714c6e
files tools/SharedTestUtils/src/test/javaclient/shared/AbstractApp2.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractFailureRegistrator.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestPresenter.java tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestableApplication.java tools/SharedTestUtils/src/test/javaclient/shared/ActionHolder.java tools/SharedTestUtils/src/test/javaclient/shared/AppLauncher.java tools/SharedTestUtils/src/test/javaclient/shared/BasicButtonChooserApp.java tools/SharedTestUtils/src/test/javaclient/shared/ButtonChooser.java tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter.java tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java tools/SharedTestUtils/src/test/javaclient/shared/DragSupport.java tools/SharedTestUtils/src/test/javaclient/shared/FilteredTestRunner.java tools/SharedTestUtils/src/test/javaclient/shared/InteroperabilityApp.java tools/SharedTestUtils/src/test/javaclient/shared/JemmyUtils.java tools/SharedTestUtils/src/test/javaclient/shared/PageWithSlots.java tools/SharedTestUtils/src/test/javaclient/shared/Scene3D.java tools/SharedTestUtils/src/test/javaclient/shared/ScrollablePageWithSlots.java tools/SharedTestUtils/src/test/javaclient/shared/SelectActionProvider.java tools/SharedTestUtils/src/test/javaclient/shared/SwingAWTUtils.java tools/SharedTestUtils/src/test/javaclient/shared/TestBase.java tools/SharedTestUtils/src/test/javaclient/shared/TestBaseBase.java tools/SharedTestUtils/src/test/javaclient/shared/TestNode.java tools/SharedTestUtils/src/test/javaclient/shared/TestNodeLeaf.java tools/SharedTestUtils/src/test/javaclient/shared/TestSceneChooser.java tools/SharedTestUtils/src/test/javaclient/shared/TestUtil.java tools/SharedTestUtils/src/test/javaclient/shared/Utils.java tools/SharedTestUtils/src/test/javaclient/shared/appendXMLWithFxInfo.java tools/SharedTestUtils/src/test/javaclient/shared/description/FXSceneTreeBuilder.java tools/SharedTestUtils/src/test/javaclient/shared/description/FXSimpleNodeDescription.java tools/SharedTestUtils/src/test/javaclient/shared/description/TreeNode.java tools/SharedTestUtils/src/test/javaclient/shared/imagescomparator/ImageDuplicateExtractor.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ImagesManager.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ScreenshotUtils.java tools/SharedTestUtils/src/test/javaclient/shared/screenshots/SerializableBufferedImage.java
diffstat 34 files changed, 342 insertions(+), 748 deletions(-) [+]
line wrap: on
line diff
--- a/tools/SharedTestUtils/src/test/javaclient/shared/AbstractApp2.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/AbstractApp2.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
@@ -48,7 +29,7 @@
  * @author Sergey Grinev
  */
 public abstract class AbstractApp2 extends Application
-        implements SelectActionProvider, AbstractTestableApplication {
+        implements SelectActionProvider, AbstractTestableApplication, Interoperability {
 
     static {
         System.setProperty("prism.lcdtext", "false");
@@ -73,6 +54,10 @@
 
     abstract protected AbstractTestPresenter createTestPresenter(Stage stage);
 
+    abstract protected AbstractTestPresenter createSwingTestPresenter(Object frame, Object panel);
+
+    abstract protected AbstractTestPresenter createSWTTestPresenter();
+
     abstract protected AbstractFailureRegistrator createFailureRegistrator();
 
     /**
@@ -129,6 +114,16 @@
         stage.setY(0);
     }
 
+    public void startSwing(Object frame, Object panel) {
+        testPresenter = createSwingTestPresenter(frame, panel);
+        commonInitOnFXQueue();
+    }
+
+    public void startSWT() {
+        testPresenter = createSWTTestPresenter();
+        commonInitOnFXQueue();
+    }
+
     protected void commonInitOnFXQueue() {
         final CountDownLatch sync = new CountDownLatch(1);
         Platform.runLater(new Runnable() {
--- a/tools/SharedTestUtils/src/test/javaclient/shared/AbstractFailureRegistrator.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/AbstractFailureRegistrator.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 /**
--- a/tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestPresenter.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestPresenter.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import javafx.scene.Scene;
@@ -30,8 +12,9 @@
  *
  * @author shubov
  */
-public interface AbstractTestPresenter<CONTAINER> {
-    void show(CONTAINER stage);
+public interface AbstractTestPresenter {
+    void show(Stage stage);
+    void show(Object frame, Object panel);
     void showTestNode(TestNode tn);
     String getScreenshotPaneName();
     Scene getScene();
--- a/tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestableApplication.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/AbstractTestableApplication.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import javafx.scene.Node;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/ActionHolder.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/ActionHolder.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import java.util.Collection;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/AppLauncher.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/AppLauncher.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
@@ -44,6 +25,12 @@
             case DEFAULT:
                 defaultLaunch(cl, args);
                 break;
+            case SWING:
+                instantiateOnSwingQueue(cl, args);
+                break;
+            case SWT:
+                instantiateOnSWTQueue(cl, args);
+                break;
             case REMOTE:
                 launchOnRemoteStage(cl, args);
                 break;
@@ -83,6 +70,23 @@
         return INSTANCE;
     }
 
+    private static void instantiateOnSwingQueue(final Class<? extends Interoperability> cl, String[] args) {
+        try {
+            SwingAWTUtils.instantiateOnSwingQueue(cl);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    private static void instantiateOnSWTQueue(final Class<? extends Interoperability> cl, String[] args) {
+        try {
+            Interoperability obj = cl.newInstance();
+            obj.startSWT();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
     private void launchOnRemoteStage(final Class<? extends Application> cl, String[] args) {
         Platform.runLater(new Runnable() {
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/BasicButtonChooserApp.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/BasicButtonChooserApp.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import java.util.logging.Level;
@@ -67,6 +49,30 @@
     }
 
     @Override
+    protected AbstractTestPresenter createSwingTestPresenter(Object frame, Object panel) {
+        return SwingAWTUtils.createSwingTestPresenter(combinedTestChooserPresenter, frame, panel);
+    }
+
+    @Override
+    protected AbstractTestPresenter createSWTTestPresenter() {
+        OtherThreadRunner.invokeOnMainThread(new Runnable() {
+            public void run() {
+                SWTUtils.createSWTTestPresenterShow(OtherThreadRunner.isRunning(), combinedTestChooserPresenter);
+            }
+        });
+
+        synchronized (combinedTestChooserPresenter) {
+            try {
+                combinedTestChooserPresenter.wait(5000);
+            } catch (InterruptedException ex) {
+                Logger.getLogger(BasicButtonChooserApp.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        }
+
+        return combinedTestChooserPresenter;
+    }
+
+    @Override
     protected AbstractFailureRegistrator createFailureRegistrator() {
         return combinedTestChooserPresenter;
     }
--- a/tools/SharedTestUtils/src/test/javaclient/shared/ButtonChooser.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/ButtonChooser.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,48 +1,31 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
 import com.sun.javafx.application.PlatformImpl;
-import java.util.concurrent.CountDownLatch;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import javafx.scene.Scene;
+import javafx.scene.layout.Pane;
+import javafx.scene.text.Text;
+import javafx.stage.Stage;
+import java.util.concurrent.CountDownLatch;
 import javafx.application.Platform;
 import javafx.scene.Group;
 import javafx.scene.Node;
-import javafx.scene.Scene;
 import javafx.scene.control.Button;
-import javafx.scene.layout.Pane;
+import javafx.scene.control.Separator;
 import javafx.scene.layout.VBox;
 import javafx.scene.paint.Color;
-import javafx.scene.text.Text;
-import javafx.stage.Stage;
+import org.eclipse.swt.widgets.Shell;
 
 /**
  *
  * @author shubov
  */
-public class CombinedTestChooserPresenter implements AbstractTestPresenter<Stage>, AbstractFailureRegistrator {
+public class CombinedTestChooserPresenter implements AbstractTestPresenter, AbstractFailureRegistrator {
 
     private Pane pageContent;
     private Node nodeForScreenshot;
@@ -184,6 +167,45 @@
         stage.setFocused(true);
     }
 
+    public void show(final Object frame, final Object panel) {
+        SwingAWTUtils.setJFrameTitle(frame, title);
+
+        final CountDownLatch sync = new CountDownLatch(1);
+        PlatformImpl.runAndWait(new Runnable() {
+
+            public void run() {
+                fillScene();
+                SwingAWTUtils.setJFXPanelScene(panel, scene);
+                SwingAWTUtils.setJFXPanelSize(panel, (int)scene.getWidth(), (int)scene.getHeight());
+                sync.countDown();
+            }
+        });
+
+        try {
+            sync.await();
+        } catch (InterruptedException ex) {
+            Logger.getLogger(CombinedTestChooserPresenter.class.getName()).log(Level.SEVERE, null, ex);
+        }
+        SwingAWTUtils.finishShow(frame);
+    }
+
+    public void show(final Shell shell, final Object panel) {
+        shell.setText(title);
+        SwingAWTUtils.setJFXPanelSize(panel, width + 50, height + TABS_SPACE + 30);
+
+        Platform.runLater(new Runnable() {
+
+            public void run() {
+                fillScene();
+                synchronized (CombinedTestChooserPresenter.this) {
+                    CombinedTestChooserPresenter.this.notify();
+                }
+                SwingAWTUtils.setJFXPanelScene(panel, scene);
+            }
+        });
+        shell.setLocation(30, 30);
+    }
+
     public Scene getScene() {
         return scene;
     }
--- a/tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/CombinedTestChooserPresenter3D.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/DragSupport.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/DragSupport.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/FilteredTestRunner.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/FilteredTestRunner.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared;
 
 import java.lang.annotation.Annotation;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/InteroperabilityApp.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/InteroperabilityApp.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import java.util.concurrent.CountDownLatch;
@@ -31,7 +13,8 @@
 import javafx.stage.Stage;
 import static test.javaclient.shared.TestUtil.isEmbedded;
 
-public abstract class InteroperabilityApp extends Application {
+public abstract class InteroperabilityApp extends Application
+                                          implements Interoperability {
 
     static {
         System.setProperty("prism.lcdtext", "false");
@@ -56,5 +39,26 @@
         stage.requestFocus();
     }
 
+    public void startSwing(Object frame, Object panel) {
+        SwingAWTUtils swUtils = new SwingAWTUtils();
+        swUtils.startSwing(frame, panel, scene, getScene());
+        scene = swUtils.scene;
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException ex) {
+            Logger.getLogger(InteroperabilityApp.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
 
+    public void startSWT() {
+        final CountDownLatch sync = new CountDownLatch(1);
+        SWTUtils swUtils = new SWTUtils();
+        swUtils.startSWT(scene, getScene(), sync);
+        scene = swUtils.scene;
+        try {
+            sync.await();
+        } catch (InterruptedException ex) {
+            Logger.getLogger(InteroperabilityApp.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
 }
--- a/tools/SharedTestUtils/src/test/javaclient/shared/JemmyUtils.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/JemmyUtils.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 import com.sun.glass.ui.Pixels;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/PageWithSlots.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/PageWithSlots.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared;
 
 import java.util.Collection;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/Scene3D.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/Scene3D.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/ScrollablePageWithSlots.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/ScrollablePageWithSlots.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/SelectActionProvider.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/SelectActionProvider.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
+
 package test.javaclient.shared;
 
 /**
--- a/tools/SharedTestUtils/src/test/javaclient/shared/SwingAWTUtils.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/SwingAWTUtils.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared;
 
 import com.sun.javafx.application.PlatformImpl;
@@ -36,7 +18,13 @@
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
 import junit.framework.Assert;
+import org.jemmy.awt.AWT;
+import org.jemmy.awt.Showing;
+import org.jemmy.control.Wrap;
+import org.jemmy.fx.Root;
+import org.jemmy.fx.SceneWrap;
 import org.jemmy.image.AWTImage;
+import org.jemmy.image.Image;
 
 /**
  *
@@ -67,6 +55,20 @@
         }
     }
 
+    public static void instantiateOnSwingQueue(Class<? extends Interoperability> cl) throws Exception{
+        JFrame frame = new JFrame();
+        final JFXPanel panel = new JFXPanel();
+        frame.getContentPane().add(panel, BorderLayout.CENTER);
+        Interoperability obj = cl.newInstance();
+        obj.startSwing(frame, panel);
+    }
+
+    public static CombinedTestChooserPresenter createSwingTestPresenter(CombinedTestChooserPresenter combinedTestChooserPresenter, Object frame, Object panel) {
+        ((JFrame)frame).getContentPane().add((JFXPanel)panel, BorderLayout.CENTER);
+        combinedTestChooserPresenter.show((JFrame)frame, (JFXPanel)panel);
+        return combinedTestChooserPresenter;
+    }
+
     public static void setJFrameTitle(Object frame, String title) {
         ((JFrame)frame).setTitle(title);
     }
@@ -94,18 +96,18 @@
         return jsEngine.eval(annotation_expr);
     }
 
-    public static double[] getColors(org.jemmy.image.Image image) {
+    public static double[] getColors(Image image) {
         BufferedImage img = ((AWTImage) image).getTheImage();
         Color color = new Color(img.getRGB(img.getWidth() / 2, img.getHeight() / 2));
         return new double[]{color.getRed(), color.getGreen(), color.getBlue()};
     }
 
-    public static Object getRGBColors(org.jemmy.image.Image image, int x, int y) {
+    public static Object getRGBColors(Image image, int x, int y) {
         BufferedImage bufImg = ((AWTImage) image).getTheImage();
         return bufImg.getRGB(x, y);
     }
 
-    public static void verifyColor(org.jemmy.image.Image image, int x, int y) {
+    public static void verifyColor(Image image, int x, int y) {
         AWTImage sceneImage = (AWTImage)image;
         Color actual = new Color(sceneImage.getTheImage().getRGB(x, y), false);
         Assert.assertTrue("Pixel in the screen center shouldn't be black (actual = " + actual + ")", !actual.equals(Color.BLACK));
@@ -115,6 +117,87 @@
         Toolkit.getDefaultToolkit();
     }
 
+    public static Wrap<? extends Scene> getScene() {
+        final Wrap<? extends Scene> scene;
+        JFXPanel fx_panel = AWT.getAWT().lookup(JFXPanel.class, new Showing<JFXPanel>()).wrap(0).getControl();
+        scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), fx_panel.getScene());
+        try {
+            SwingUtilities.invokeLater(new Runnable() {
+                public void run() {
+                    AWT.getAWT().lookup(JFrame.class, new Showing<JFrame>()).wrap(0).getControl().toFront();
+                }
+            });
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return scene;
+    }
 
+    public void startSwing(final Object frame,final Object panel,final Scene scene, final Scene getScene) {
+        this.scene = scene;
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                SwingAWTUtils.this.frame = ((JFrame)frame);
+                ((JFrame)frame).setName(this.getClass().getSimpleName());
+                ((JFrame)frame).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                javafxSwingPanel = ((JFXPanel)panel);
+                ((JFrame)frame).getContentPane().add(javafxSwingPanel, BorderLayout.CENTER);
+                PlatformImpl.runAndWait(new Runnable() {
+                    public void run() {
+                        SwingAWTUtils.this.scene = getScene;
+                        Utils.setCustomFont(scene);
+                        javafxSwingPanel.setScene(scene);
+                        SwingAWTUtils.this.scene.heightProperty().addListener(new SwingAWTUtils.SwingSizeListener());
+                        SwingAWTUtils.this.scene.widthProperty().addListener(new SwingAWTUtils.SwingSizeListener());
+                    }
+                });
+                ((JFrame)frame).setLocationRelativeTo(null);
+                ((JFrame)frame).setLocationByPlatform(true);
+                ((JFrame)frame).setVisible(true);
+                PlatformImpl.runAndWait(new Runnable() {
+                    public void run() {
+                        javafxSwingPanel.setSize(new Dimension((int) scene.getWidth(), (int) scene.getHeight()));
+                    }
+                });
+                ((JFrame)frame).pack();
+                ((JFrame)frame).toFront();
+                ((JFrame)frame).requestFocus();
+                javafxSwingPanel.requestFocus();
+                ((JFrame)frame).setLocation(30, 30);
+            }
+        });
+    }
 
+    class SwingSizeListener implements ChangeListener<Number> {
+        public void changed(final ObservableValue<? extends Number> ov, final Number t, final Number t1) {
+            SwingUtilities.invokeLater(new Runnable() {
+                public void run() {
+                    PlatformImpl.runAndWait(new Runnable() {
+                        public void run() {
+                            javafxSwingPanel.setSize(new Dimension((int)scene.getWidth(), (int)scene.getHeight()));
+                        }
+                    });
+                    frame.pack();
+                }
+            });
+        }
+    }
+
+    static class SceneRetriever implements Runnable {
+
+        FXCanvas swtPanel;
+        Wrap<? extends Scene> scene = null;
+
+        public SceneRetriever(final FXCanvas swt_panel) {
+            swtPanel = swt_panel;
+        }
+
+        public void run() {
+            scene = new SceneWrap<Scene>(Root.ROOT.getEnvironment(), swtPanel.getScene());
+        }
+
+        public Wrap<? extends Scene> getScene() {
+            return scene;
+        }
+    }
 }
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestBase.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestBase.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestBaseBase.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestBaseBase.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestNode.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestNode.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestNodeLeaf.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestNodeLeaf.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestSceneChooser.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestSceneChooser.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/TestUtil.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/TestUtil.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
@@ -74,6 +55,10 @@
         return (vmOpt != null) ? vmOpt : null;
     }
 
+
+
+
+
     public static boolean write(Serializable obj, String name) {
         try {
             FileOutputStream ostream = new FileOutputStream(name);
@@ -88,12 +73,12 @@
         return true;
     }
 
-    public static Object read(String name) {
+    public static Object read(String name)  {
         Object obj = null;
         try {
             FileInputStream ostream = new FileInputStream(name);
             ObjectInputStream p = new ObjectInputStream(ostream);
-            obj = p.readObject();
+             obj = p.readObject();
             ostream.close();
         } catch (IOException ex) {
             Logger.getLogger(TreeNode.class.getName()).log(Level.SEVERE, null, ex);
@@ -103,6 +88,8 @@
         return obj;
     }
 
+
+
     /**
      * Verify screenshots of two wraps
      *
@@ -132,14 +119,18 @@
 
     public static Wrap<? extends Scene> getScene() {
         final Wrap<? extends Scene> scene;
-
-        scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0);
-        Utils.deferAction(new Runnable() {
-            public void run() {
-                scene.getControl().getWindow().setFocused(true);
-            }
-        });
-
+        if (AppLauncher.getInstance().getMode() == AppLauncher.Mode.SWING) {
+            scene = SwingAWTUtils.getScene();
+        } else if (AppLauncher.getInstance().getMode() == AppLauncher.Mode.SWT) {
+            scene = SWTUtils.getScene();
+        } else {
+            scene = Root.ROOT.lookup(new ByWindowType(Stage.class)).lookup(Scene.class).wrap(0);
+            Utils.deferAction(new Runnable() {
+                public void run() {
+                    scene.getControl().getWindow().setFocused(true);
+                }
+            });
+        }
         return scene;
     }
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/Utils.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/Utils.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/appendXMLWithFxInfo.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/appendXMLWithFxInfo.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/description/FXSceneTreeBuilder.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/description/FXSceneTreeBuilder.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared.description;
 
 import java.lang.reflect.InvocationTargetException;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/description/FXSimpleNodeDescription.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/description/FXSimpleNodeDescription.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared.description;
 
 import java.io.Serializable;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/description/TreeNode.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/description/TreeNode.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,8 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
  */
+
 package test.javaclient.shared.description;
 
 import java.io.FileInputStream;
--- a/tools/SharedTestUtils/src/test/javaclient/shared/imagescomparator/ImageDuplicateExtractor.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/imagescomparator/ImageDuplicateExtractor.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared.imagescomparator;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ImagesManager.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ImagesManager.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2010-2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared.screenshots;
 
@@ -80,8 +61,8 @@
     }
 
     /**
-     * Set's the absolute directory to for screenshots work. Shouldn't be called
-     * for desktop run.
+     * Set's the absolute directory to for screenshots work. Shouldn't be called for
+     * desktop run.
      *
      * @param absoluteDir absolute directory, where whill be result screenshots
      */
@@ -202,16 +183,10 @@
     }
 
     private String computeGoldenImagePath() {
-        File imageSetDir = new File(baseDir + File.separator + ROOT_IMAGES_DIRECTORY);
-        String imageFile = File.separator
+        return baseDir + File.separator + ".." + File.separator + ROOT_IMAGES_DIRECTORY + File.separator
                 + getProjectName() + File.separator
                 + getPrismOrderFolderName() + File.separator
                 + osFolder();
-        if (imageSetDir.exists() && imageSetDir.isDirectory()) {
-            return imageSetDir.getAbsolutePath() + imageFile;
-        } else {
-            return baseDir + File.separator + ".." + File.separator + ROOT_IMAGES_DIRECTORY + imageFile;
-        }
     }
 
     private static String getPrismOrderFolderName() {
--- a/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ScreenshotUtils.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/ScreenshotUtils.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,25 +1,6 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  */
 package test.javaclient.shared.screenshots;
 
--- a/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/SerializableBufferedImage.java	Thu Feb 07 15:07:43 2013 +0400
+++ b/tools/SharedTestUtils/src/test/javaclient/shared/screenshots/SerializableBufferedImage.java	Thu Feb 07 16:36:54 2013 +0400
@@ -1,26 +1,3 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- */
 package test.javaclient.shared.screenshots;
 
 import java.awt.image.BufferedImage;