changeset 9775:3571831b0b9d

8156809: Remove obsolete com.sun.javafx.robot package Reviewed-by: ckyang
author kcr
date Thu, 12 May 2016 14:04:52 -0700
parents 3000af712724
children 048cd50856e5
files modules/graphics/src/main/java/com/sun/javafx/robot/FXRobot.java modules/graphics/src/main/java/com/sun/javafx/robot/FXRobotFactory.java modules/graphics/src/main/java/com/sun/javafx/robot/FXRobotImage.java modules/graphics/src/main/java/com/sun/javafx/robot/impl/BaseFXRobot.java modules/graphics/src/main/java/com/sun/javafx/robot/impl/FXRobotHelper.java modules/graphics/src/main/java/javafx/scene/Scene.java modules/graphics/src/main/java/javafx/scene/input/KeyEvent.java
diffstat 7 files changed, 0 insertions(+), 965 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/robot/FXRobot.java	Fri May 13 01:30:02 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2009, 2015, 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
- * questions.
- */
-
-package com.sun.javafx.robot;
-
-import javafx.scene.input.KeyCode;
-import javafx.scene.input.MouseButton;
-
-/**
- * Defines interface for generation of FX level events for purposes of test
- * automation, self running demos and other applications where control of the
- * mouse and keyboard is needed.
- *
- */
-public abstract class FXRobot {
-    protected boolean autoWait = false;
-
-    /**
-     * Block until events in the queue are processed.
-     */
-    public abstract void waitForIdle();
-
-    /**
-     * Whether to wait for events to be processed after each robot command
-     * @param wait if true, wait until events in the queue are processed
-     */
-    public void setAutoWaitForIdle(boolean wait) {
-        autoWait = wait;
-    }
-
-    /**
-     * Generate a key pressed event.
-     * @param code key code for this event
-     */
-    public abstract void keyPress(KeyCode code);
-
-    /**
-     * Generate a key released event.
-     *
-     * Note that KeyTyped event will not be generated automatically on key
-     * released,
-     * {@link #keyType(javafx.scene.input.KeyCode, java.lang.String)} will
-     * need to be called explicitly.
-     *
-     * @param code key code for this event
-     */
-    public abstract void keyRelease(KeyCode code);
-
-    /**
-     * Generate a key typed event. The {@code keyChar} argument will need to
-     * depend on what character is generated by this event. That is, the user
-     * will need to take into account different modifiers currently applied and
-     * so forth. If shift is presumed to be pressed, the char will be "A",
-     * otherwise it will be "a".
-     *
-     * @param code key code for this event
-     * @param keyChar char for this event
-     */
-    public abstract void keyType(KeyCode code, String keyChar);
-
-    /**
-     * Generate a mouse moved event.
-     *
-     * @param x scene coordinate x
-     * @param y scene coordinate y
-     */
-    public abstract void mouseMove(int x, int y);
-
-    /**
-     * Generate a mouse press event with specified click count.
-     *
-     * Note that a multi-click gesture consists of multiple sets of
-     * MousePressed/MouseReleased/MouseClicked events, with second and following
-     * sets having appropriate click count set.
-     * <br>
-     * For example, a double click is emulated with:
-     * {@code press/release/click} followed by {@code press(2)/release(2)/click(2)}
-     *
-     * @param button button to have generated the event
-     * @param clickCount number of clicks for this event
-     */
-    public abstract void mousePress(MouseButton button, int clickCount);
-
-    /**
-     * Generate a mouse release event with specified click count.
-     *
-     * Note that this method will not generate a MouseClicked event, use
-     * {@link #mouseClick(javafx.scene.input.MouseButton) } for that.
-     *
-     * Note that a multi-click gesture consists of multiple sets of
-     * MousePressed/MouseReleased/MouseClicked events, with second and following
-     * sets having appropriate click count set.
-     * <br>
-     * For example, a double click is emulated with:
-     * {@code press/release/click} followed by {@code press(2)/release(2)/click(2)}
-     *
-     * @param button button to have generated the event
-     * @param clickCount number of clicks for this event
-     */
-    public abstract void mouseRelease(MouseButton button, int clickCount);
-
-    /**
-     * Generate a mouse clicked event with specified click count.
-     *
-     * Note that a multi-click gesture consists of multiple sets of
-     * MousePressed/MouseReleased/MouseClicked events, with second and following
-     * sets having appropriate click count set.
-     * <br>
-     * For example, a double click is emulated with:
-     * {@code press/release/click} followed by {@code press(2)/release(2)/click(2)}
-     *
-     * @param button button to have generated the event
-     * @param clickCount number of clicks for this event
-     */
-    public abstract void mouseClick(MouseButton button, int clickCount);
-
-    /**
-     * Generate a mouse pressed event with click count of 1.
-     *
-     * @param button button to have generated the event
-     */
-    public void mousePress(MouseButton button) {
-        mousePress(button, 1);
-    }
-
-    /**
-     * Generate a mouse pressed event with click count of 1.
-     *
-     * Note that this method will not generate a MouseClicked event, use
-     * {@link #mouseClick(javafx.scene.input.MouseButton) } for that.
-     *
-     * @param button button to have generated the event
-     */
-    public void mouseRelease(MouseButton button) {
-        mouseRelease(button, 1);
-    }
-
-    /**
-     * Generate a mouse clicked event with click count of 1.
-     *
-     * @param button button to have generated the event
-     */
-    public void mouseClick(MouseButton button) {
-        mouseClick(button, 1);
-    }
-
-    /**
-     * Generate a mouse dragged event.
-     *
-     * @param button button to have generated the event
-     */
-    public abstract void mouseDrag(MouseButton button);
-
-    /**
-     * Generate a mouse wheel event.
-     *
-     * @param wheelAmt amount the wheel has turned of wheel turning
-     */
-    public abstract void mouseWheel(int wheelAmt);
-
-    /**
-     * Returns pixel color at specified scene coordinates in IntARGB format,
-     * {@code 0} if the passed coordinates are outside of the scene's bounds or
-     * if pixel grabbing isn't supported.
-     *
-     * @param x scene coordinate
-     * @param y scene coordinate
-     * @return pixel color in IntARGB format or {@code 0} if outside of scene
-     * bounds or if pixel grabbing isn't supported
-     */
-    public abstract int getPixelColor(int x, int y);
-
-    /**
-     * Returns a {@link FXRobotImage} object representing in image with contents
-     * of the scene at specified coordinates, or null if scene pixel capturing
-     * isn't supported.
-     *
-     * Implementation note: current implementation ignores passed parameters and
-     * always captures complete scene.
-     *
-     * @param x scene coordinate
-     * @param y scene coordinate
-     * @param width of the area to capture
-     * @param height of the area to capture
-     * @return {@code FXRobotImage} containing captured pixels or null if pixel
-     * capturing isn't supproted
-     */
-    public abstract FXRobotImage getSceneCapture(int x, int y, int width, int height);
-}
--- a/modules/graphics/src/main/java/com/sun/javafx/robot/FXRobotFactory.java	Fri May 13 01:30:02 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2009, 2013, 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
- * questions.
- */
-
-package com.sun.javafx.robot;
-
-import javafx.scene.Scene;
-
-import com.sun.javafx.robot.impl.BaseFXRobot;
-
-public class FXRobotFactory {
-    /**
-     * Creates FXRobot instance which controls given scene.
-     *
-     */
-    public static FXRobot createRobot(Scene scene) {
-        return new BaseFXRobot(scene);
-    }
-}
--- a/modules/graphics/src/main/java/com/sun/javafx/robot/FXRobotImage.java	Fri May 13 01:30:02 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2009, 2013, 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
- * questions.
- */
-
-package com.sun.javafx.robot;
-
-import java.nio.Buffer;
-import java.nio.IntBuffer;
-
-/**
- * This class encapsulates a bucket of pixels stored in IntArgbPre format.
- *
- */
-public class FXRobotImage {
-    private final IntBuffer pixelBuffer;
-    private final int width;
-    private final int height;
-    private final int scanlineStride;
-
-    public static FXRobotImage create(Buffer pixelBuffer,
-                                      int width, int height, int scanlineStride)
-    {
-        return new FXRobotImage(pixelBuffer, width, height, scanlineStride);
-    }
-
-    private FXRobotImage(Buffer pixelBuffer,
-                         int width, int height, int scanlineStride)
-    {
-        if (pixelBuffer == null) {
-            throw new IllegalArgumentException("Pixel buffer must be non-null");
-        }
-        if (width <= 0 || height <= 0) {
-            throw new IllegalArgumentException("Image dimensions must be > 0");
-        }
-        this.pixelBuffer = (IntBuffer)pixelBuffer;
-        this.width = width;
-        this.height = height;
-        this.scanlineStride = scanlineStride;
-    }
-
-    /**
-     * Returns {@link java.nio.Buffer} which holds the data.
-     *
-     * @return {@code Buffer} holding the data for this image
-     */
-    public Buffer getPixelBuffer() {
-        return pixelBuffer;
-    }
-
-    /**
-     * Width of the image.
-     * @return width
-     */
-    public int getWidth() {
-        return width;
-    }
-
-    /**
-     * Height of the image
-     * @return height
-     */
-    public int getHeight() {
-        return height;
-    }
-
-    /**
-     * Returns scanline stride of this image in bytes
-     *
-     * @return scan line stride in bytes
-     */
-    public int getScanlineStride() {
-        return scanlineStride;
-    }
-
-    /**
-     * Returns pixel stride of this image in bytes.
-     *
-     * @return pixel stride in bytes
-     */
-    public int getPixelStride() {
-        return 4;
-    }
-
-    /**
-     * Returns pixel (in IntArgbPre) format (Argb premultiplied).
-     *
-     * @param x coordinate
-     * @param y coordinate
-     * @return pixel in IntArgbPre format
-     */
-    public int getArgbPre(int x, int y) {
-        if (x < 0 || x >= width || y < 0 || y >= height) {
-            throw new IllegalArgumentException("x,y must be >0, <width, height");
-        }
-        return pixelBuffer.get(x + y*scanlineStride/4);
-    }
-
-    /**
-     * Returns pixel in IntArgb format (non-premultiplied).
-     *
-     * @param x coordinate
-     * @param y coordinate
-     * @return pixel in IntArgb format
-     */
-    public int getArgb(int x, int y) {
-        if (x < 0 || x >= width || y < 0 || y >= height) {
-            throw new IllegalArgumentException("x,y must be >0, <width, height");
-        }
-        int argb = pixelBuffer.get(x + y*scanlineStride/4);
-        if ((argb >> 24) == -1) {
-            return argb;
-        }
-        int a = argb >>> 24;
-        int r = (argb >> 16) & 0xff;
-        int g = (argb >>  8) & 0xff;
-        int b = (argb      ) & 0xff;
-        int a2 = a + (a >> 7);
-        r = (r * a2) >> 8;
-        g = (g * a2) >> 8;
-        b = (b * a2) >> 8;
-        return ((a << 24) | (r << 16) | (g << 8) | (b));
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() +
-            " [format=INT_ARGB_PRE width=" + width + " height=" + height +
-            " scanlineStride=" + scanlineStride  +" pixelStride=" + getPixelStride()+
-            " pixelBuffer=" + pixelBuffer + "]";
-    }
-}
--- a/modules/graphics/src/main/java/com/sun/javafx/robot/impl/BaseFXRobot.java	Fri May 13 01:30:02 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2009, 2014, 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
- * questions.
- */
-
-package com.sun.javafx.robot.impl;
-
-import static javafx.scene.input.KeyCode.ALT;
-import static javafx.scene.input.KeyCode.CONTROL;
-import static javafx.scene.input.KeyCode.META;
-import static javafx.scene.input.KeyCode.SHIFT;
-
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-
-import javafx.event.EventType;
-import javafx.scene.Scene;
-import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseButton;
-import javafx.scene.input.MouseEvent;
-
-import com.sun.javafx.application.PlatformImpl;
-import com.sun.javafx.robot.FXRobot;
-import com.sun.javafx.robot.FXRobotImage;
-import javafx.scene.input.ScrollEvent;
-
-/**
- * An implementation of FXRobot which injects the events into the FX event queue
- *
- */
-public class BaseFXRobot extends FXRobot {
-    static {
-        // force initialization of the input accessors
-        String stuff = KeyEvent.CHAR_UNDEFINED;
-    }
-
-    private static final boolean debugOut = computeDebugOut();
-
-    private static boolean computeDebugOut() {
-        boolean debug = false;
-        try {
-            debug = "true".equals(System.getProperty("fxrobot.verbose", "false"));
-        } catch (Throwable th) {}
-        return debug;
-    };
-
-    private static void out(String s) {
-        if (debugOut) {
-            System.out.println("[FXRobot] " + s);
-        }
-    }
-
-    private static Map<KeyCode,String> keyTextMap;
-    private static String getKeyText(KeyCode keyCode) {
-        return keyCode.getName();
-    }
-
-    private Scene target;
-
-    public BaseFXRobot(Scene target) {
-        this.target = target;
-    }
-
-    private boolean isShiftDown = false;
-    private boolean isControlDown = false;
-    private boolean isAltDown = false;
-    private boolean isMetaDown = false;
-
-    private boolean isButton1Pressed = false;
-    private boolean isButton2Pressed = false;
-    private boolean isButton3Pressed = false;
-
-    private MouseButton lastButtonPressed = null;
-
-    private double sceneMouseX;
-    private double sceneMouseY;
-    private double screenMouseX;
-    private double screenMouseY;
-
-    // TODO: need to devise a cross implementation way fo doing this
-//    public function waitForFirstRepaint(timeout: Integer) : Void {
-//        def latch : CountDownLatch = new CountDownLatch(1);
-//        FX.deferAction(function(): Void {
-//            var tracker = com.sun.javafx.perf.PerformanceTracker.getSceneTracker(target);
-//            var f = tracker.onFirstPulse;
-//            tracker.onFirstPulse = function():Void {
-//                latch.countDown();
-//                if (f != null) {
-//                    tracker.onFirstPulse = f;
-//                }
-//            }
-//        });
-//        while (true) {
-//            try {
-//                latch.await(timeout, java.util.concurrent.TimeUnit.MILLISECONDS);
-//                break;
-//            } catch (e: java.lang.InterruptedException) {}
-//        }
-//    }
-
-    @Override public void waitForIdle() {
-        // TODO: use better scheme for waiting when pulses stop
-        final CountDownLatch latch = new CountDownLatch(1);
-        PlatformImpl.runLater(() -> latch.countDown());
-        while (true) {
-            try {
-                latch.await();
-                break;
-            } catch (InterruptedException e) {}
-        }
-    }
-
-    @Override public void keyPress(KeyCode keyCode) {
-        doKeyEvent(KeyEvent.KEY_PRESSED, keyCode, "");
-    }
-
-    @Override public void keyRelease(KeyCode keyCode) {
-        doKeyEvent(KeyEvent.KEY_RELEASED, keyCode, "");
-    }
-
-    @Override public void keyType(KeyCode keyCode, String keyChar) {
-        doKeyEvent(KeyEvent.KEY_TYPED, keyCode, keyChar);
-    }
-
-    @Override public void mouseMove(int x, int y) {
-        doMouseEvent(x, y, lastButtonPressed, 0, MouseEvent.MOUSE_MOVED);
-    }
-    @Override public void mousePress(MouseButton button, int clickCount) {
-        doMouseEvent(sceneMouseX, sceneMouseY, button, clickCount, MouseEvent.MOUSE_PRESSED);
-    }
-    @Override public void mouseRelease(MouseButton button, int clickCount) {
-        doMouseEvent(sceneMouseX, sceneMouseY, button, clickCount, MouseEvent.MOUSE_RELEASED);
-    }
-    @Override public void mouseClick(MouseButton button, int clickCount) {
-        doMouseEvent(sceneMouseX, sceneMouseY, button, clickCount,
-                     MouseEvent.MOUSE_CLICKED);
-    }
-    @Override public void mouseDrag(MouseButton button) {
-        doMouseEvent(sceneMouseX, sceneMouseY, button, 0, MouseEvent.MOUSE_DRAGGED);
-    }
-    @Override public void mouseWheel(int wheelAmt) {
-        doScrollEvent(sceneMouseX, sceneMouseY, wheelAmt, ScrollEvent.SCROLL);
-    }
-
-    @Override public int getPixelColor(int x, int y) {
-        FXRobotImage image = getSceneCapture(0, 0, 100, 100);
-        if (image != null) {
-            return image.getArgb(x, y);
-        }
-        return 0;
-    }
-
-    private Object lastImage;
-    private FXRobotImage lastConvertedImage;
-    @Override public FXRobotImage getSceneCapture(int x, int y, int w, int h) {
-        Object ret = FXRobotHelper.sceneAccessor.renderToImage(target, lastImage);
-        if (ret != null) {
-            lastImage = ret;
-            lastConvertedImage =
-                FXRobotHelper.imageConvertor.convertToFXRobotImage(ret);
-        }
-        return lastConvertedImage;
-    }
-
-    private void doKeyEvent(EventType<KeyEvent> eventType, KeyCode keyCode, String character) {
-        boolean pressed = eventType == KeyEvent.KEY_PRESSED;
-        boolean typed = eventType == KeyEvent.KEY_TYPED;
-        if (keyCode == SHIFT) {
-            isShiftDown = pressed;
-        }
-        if (keyCode == CONTROL) {
-            isControlDown = pressed;
-        }
-        if (keyCode == ALT) {
-            isAltDown = pressed;
-        }
-        if (keyCode == META) {
-            isMetaDown = pressed;
-        }
-
-        String keyText = typed ? "" : getKeyText(keyCode);
-        String keyChar = typed ? character : KeyEvent.CHAR_UNDEFINED;
-
-        final KeyEvent e = FXRobotHelper.inputAccessor.
-            createKeyEvent(eventType, keyCode, keyChar, keyText,
-                           isShiftDown, isControlDown, isAltDown, isMetaDown);
-
-        PlatformImpl.runLater(() -> {
-            out("doKeyEvent: injecting: {e}");
-            FXRobotHelper.sceneAccessor.processKeyEvent(target, e);
-        });
-        if (autoWait) {
-            waitForIdle();
-        }
-    }
-
-    private void doMouseEvent(double x, double y, MouseButton passedButton,
-            int clickCount, EventType<MouseEvent> passedType)
-    {
-        screenMouseX = target.getWindow().getX() + target.getX() + x;
-        screenMouseY = target.getWindow().getY() + target.getY() + y;
-        sceneMouseX = x;
-        sceneMouseY = y;
-
-        MouseButton button = passedButton;
-        EventType<MouseEvent> type = passedType;
-        if (type == MouseEvent.MOUSE_PRESSED || type == MouseEvent.MOUSE_RELEASED) {
-            boolean pressed = type == MouseEvent.MOUSE_PRESSED;
-            if (button == MouseButton.PRIMARY) {
-                isButton1Pressed = pressed;
-            } else if (button == MouseButton.MIDDLE) {
-                isButton2Pressed = pressed;
-            } else if (button == MouseButton.SECONDARY) {
-                isButton3Pressed = pressed;
-            }
-            if (pressed) {
-                lastButtonPressed = button;
-            } else {
-                if (!(isButton1Pressed || isButton2Pressed || isButton3Pressed)) {
-                    lastButtonPressed = MouseButton.NONE;
-                }
-            }
-        } else if (type == MouseEvent.MOUSE_MOVED) {
-            boolean someButtonPressed = isButton1Pressed || isButton2Pressed || isButton3Pressed;
-            if (someButtonPressed) {
-                type = MouseEvent.MOUSE_DRAGGED;
-                button = MouseButton.NONE;
-            }
-        }
-
-        final MouseEvent e = FXRobotHelper.inputAccessor.
-            createMouseEvent(type, (int)sceneMouseX, (int)sceneMouseY,
-                             (int)screenMouseX, (int)screenMouseY,
-                             button, clickCount,
-                             isShiftDown,
-                             isControlDown,
-                             isAltDown,
-                             isMetaDown,
-                             button == MouseButton.SECONDARY,
-                             isButton1Pressed,
-                             isButton2Pressed,
-                             isButton3Pressed);
-        PlatformImpl.runLater(() -> {
-            out("doMouseEvent: injecting: " + e);
-            FXRobotHelper.sceneAccessor.processMouseEvent(target, e);
-        });
-        if (autoWait) {
-            waitForIdle();
-        }
-    }
-
-    private void doScrollEvent(double x, double y, double rotation,
-            EventType<ScrollEvent> type)
-    {
-        screenMouseX = target.getWindow().getX() + target.getX() + x;
-        screenMouseY = target.getWindow().getY() + target.getY() + y;
-        sceneMouseX = x;
-        sceneMouseY = y;
-
-        final ScrollEvent e = FXRobotHelper.inputAccessor.
-            createScrollEvent(type, 0, (int)rotation * 40,
-                             ScrollEvent.HorizontalTextScrollUnits.NONE, 0,
-                             ScrollEvent.VerticalTextScrollUnits.NONE, 0,
-                             (int)sceneMouseX, (int)sceneMouseY,
-                             (int)screenMouseX, (int)screenMouseY,
-                             isShiftDown,
-                             isControlDown,
-                             isAltDown,
-                             isMetaDown);
-        PlatformImpl.runLater(() -> {
-            out("doScrollEvent: injecting: " + e);
-            FXRobotHelper.sceneAccessor.processScrollEvent(target, e);
-        });
-        if (autoWait) {
-            waitForIdle();
-        }
-    }
-}
--- a/modules/graphics/src/main/java/com/sun/javafx/robot/impl/FXRobotHelper.java	Fri May 13 01:30:02 2016 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2009, 2016, 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
- * questions.
- */
-
-package com.sun.javafx.robot.impl;
-
-import javafx.collections.ObservableList;
-import javafx.event.EventType;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.Scene;
-import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseButton;
-import javafx.scene.input.MouseEvent;
-import javafx.scene.paint.Color;
-
-import com.sun.javafx.robot.FXRobotImage;
-import javafx.scene.input.ScrollEvent;
-
-/**
- * Utility class class used for accessing certain implementation-specific
- * runtime functionality.
- *
- */
-public class FXRobotHelper {
-
-    static FXRobotInputAccessor inputAccessor;
-    static FXRobotSceneAccessor sceneAccessor;
-    static FXRobotImageConvertor imageConvertor;
-
-    /**
-     * Returns a ObservableList containing this passed parent's children.
-     *
-     * Note that application must use/reference javafx.scene.Scene class prior to
-     * using this method (for example, by creating a scene).
-     *
-     * @param p Parent subclass to get children for
-     * @return ObservableList containing this parent's children
-     */
-    public static ObservableList<Node> getChildren(Parent p) {
-        if (sceneAccessor == null) {
-            // TODO: force scene initialization
-        }
-        return sceneAccessor.getChildren(p);
-    }
-
-    /**
-     * Converts passed integer in IntArgb pixel format to Color.
-     * @return Color object
-     */
-    public static Color argbToColor(int argb) {
-        int a = argb >> 24;
-        a = a & 0xff;
-        float aa = ((float)a) / 255f;
-
-        int r = argb >> 16;
-        r = r & 0xff;
-
-        int g = argb >> 8;
-        g = g & 0xff;
-
-        int b = argb;
-        b = b & 0xff;
-
-        return Color.rgb(r, g, b, aa);
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static void setInputAccessor(FXRobotInputAccessor a) {
-        if (inputAccessor != null) {
-            System.out.println("Warning: Input accessor is already set: " + inputAccessor);
-            Thread.dumpStack();
-        }
-        inputAccessor = a;
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static void setSceneAccessor(FXRobotSceneAccessor a) {
-        if (sceneAccessor != null) {
-            System.out.println("Warning: Scene accessor is already set: " + sceneAccessor);
-            Thread.dumpStack();
-        }
-        sceneAccessor = a;
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static void setImageConvertor(FXRobotImageConvertor ic) {
-        if (imageConvertor != null) {
-            System.out.println("Warning: Image convertor is already set: " + imageConvertor);
-            Thread.dumpStack();
-        }
-        imageConvertor = ic;
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static abstract class FXRobotImageConvertor {
-          public abstract FXRobotImage
-              convertToFXRobotImage(Object platformImage);
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static abstract class FXRobotInputAccessor {
-        public abstract int getCodeForKeyCode(KeyCode keyCode);
-        public abstract KeyCode getKeyCodeForCode(int code);
-        public abstract KeyEvent createKeyEvent(
-                                EventType<? extends KeyEvent> eventType,
-                                KeyCode keyCode, String keyChar, String keyText,
-                                boolean shiftDown, boolean controlDown,
-                                boolean altDown, boolean metaDown);
-        public abstract MouseEvent createMouseEvent(
-                                EventType<? extends MouseEvent> eventType,
-                                int x, int y,
-                                int screenX, int screenY,
-                                MouseButton button,
-                                int clickCount,
-                                boolean shiftDown,
-                                boolean controlDown,
-                                boolean altDown,
-                                boolean metaDown,
-                                boolean popupTrigger,
-                                boolean primaryButtonDown,
-                                boolean middleButtonDown,
-                                boolean secondaryButtonDown);
-        public abstract ScrollEvent createScrollEvent(
-                                EventType<? extends ScrollEvent> eventType,
-                                int scrollX, int scrollY,
-                                ScrollEvent.HorizontalTextScrollUnits xTextUnits,
-                                int xText,
-                                ScrollEvent.VerticalTextScrollUnits yTextUnits,
-                                int yText,
-                                int x, int y,
-                                int screenX, int screenY,
-                                boolean shiftDown,
-                                boolean controlDown,
-                                boolean altDown,
-                                boolean metaDown);
-    }
-
-    /**
-     * @treatAsPrivate implementation detail
-     */
-    public static abstract class FXRobotSceneAccessor {
-        public abstract void processKeyEvent(Scene scene, KeyEvent keyEvent);
-        public abstract void processMouseEvent(Scene scene, MouseEvent mouseEvent);
-        public abstract void processScrollEvent(Scene scene, ScrollEvent scrollEvent);
-        public abstract ObservableList<Node> getChildren(Parent parent);
-        public abstract Object renderToImage(Scene scene, Object platformImage);
-    }
-}
--- a/modules/graphics/src/main/java/javafx/scene/Scene.java	Fri May 13 01:30:02 2016 +0530
+++ b/modules/graphics/src/main/java/javafx/scene/Scene.java	Thu May 12 14:04:52 2016 -0700
@@ -38,7 +38,6 @@
 import com.sun.javafx.geom.Vec3d;
 import com.sun.javafx.geom.transform.BaseTransform;
 import com.sun.javafx.perf.PerformanceTracker;
-import com.sun.javafx.robot.impl.FXRobotHelper;
 import com.sun.javafx.runtime.SystemProperties;
 import com.sun.javafx.scene.CssFlags;
 import com.sun.javafx.scene.LayoutFlags;
@@ -365,23 +364,6 @@
                     }
                 }
             });
-            FXRobotHelper.setSceneAccessor(new FXRobotHelper.FXRobotSceneAccessor() {
-                public void processKeyEvent(Scene scene, KeyEvent keyEvent) {
-                    scene.impl_processKeyEvent(keyEvent);
-                }
-                public void processMouseEvent(Scene scene, MouseEvent mouseEvent) {
-                    scene.impl_processMouseEvent(mouseEvent);
-                }
-                public void processScrollEvent(Scene scene, ScrollEvent scrollEvent) {
-                    scene.processGestureEvent(scrollEvent, scene.scrollGesture);
-                }
-                public ObservableList<Node> getChildren(Parent parent) {
-                    return parent.getChildren(); //was impl_getChildren
-                }
-                public Object renderToImage(Scene scene, Object platformImage) {
-                    return Toolkit.getImageAccessor().getPlatformImage(scene.snapshot(null));
-                }
-            });
             SceneHelper.setSceneAccessor(
                     new SceneHelper.SceneAccessor() {
                         @Override
--- a/modules/graphics/src/main/java/javafx/scene/input/KeyEvent.java	Fri May 13 01:30:02 2016 +0530
+++ b/modules/graphics/src/main/java/javafx/scene/input/KeyEvent.java	Thu May 12 14:04:52 2016 -0700
@@ -30,8 +30,6 @@
 import javafx.event.EventTarget;
 import javafx.event.EventType;
 
-import com.sun.javafx.robot.impl.FXRobotHelper;
-import com.sun.javafx.robot.impl.FXRobotHelper.FXRobotInputAccessor;
 import com.sun.javafx.scene.input.KeyCodeMap;
 import javafx.event.Event;
 import javafx.scene.input.ScrollEvent.HorizontalTextScrollUnits;
@@ -114,68 +112,6 @@
     public static final EventType<KeyEvent> KEY_TYPED =
             new EventType<KeyEvent>(KeyEvent.ANY, "KEY_TYPED");
 
-    static {
-        FXRobotInputAccessor a = new FXRobotInputAccessor() {
-            @Override public int getCodeForKeyCode(KeyCode keyCode) {
-                return keyCode.code;
-            }
-            @Override public KeyCode getKeyCodeForCode(int code) {
-                return KeyCodeMap.valueOf(code);
-            }
-            @Override public KeyEvent createKeyEvent(
-                EventType<? extends KeyEvent> eventType,
-                KeyCode code, String character, String text,
-                boolean shiftDown, boolean controlDown,
-                boolean altDown, boolean metaDown)
-            {
-                return new KeyEvent((EventType<KeyEvent>)eventType, character, text, code,
-                        shiftDown, controlDown, altDown, metaDown);
-            }
-            @Override public MouseEvent createMouseEvent(
-                EventType<? extends MouseEvent> eventType,
-                int x, int y, int screenX, int screenY,
-                MouseButton button, int clickCount, boolean shiftDown,
-                boolean controlDown, boolean altDown, boolean metaDown,
-                boolean popupTrigger, boolean primaryButtonDown,
-                boolean middleButtonDown, boolean secondaryButtonDown)
-            {
-                return new MouseEvent(eventType, x, y,
-                                           screenX, screenY,
-                                           button, clickCount,
-                                           shiftDown,
-                                           controlDown,
-                                           altDown,
-                                           metaDown,
-                                           primaryButtonDown,
-                                           middleButtonDown,
-                                           secondaryButtonDown,
-                                           false,
-                                           popupTrigger,
-                                           false,
-                                           null
-                                           );
-            }
-
-            @Override
-            public ScrollEvent createScrollEvent(
-                    EventType<? extends ScrollEvent> eventType,
-                    int scrollX, int scrollY,
-                    HorizontalTextScrollUnits xTextUnits, int xText,
-                    VerticalTextScrollUnits yTextUnits, int yText,
-                    int x, int y, int screenX, int screenY,
-                    boolean shiftDown, boolean controlDown,
-                    boolean altDown, boolean metaDown) {
-                return new ScrollEvent(ScrollEvent.SCROLL,
-                        x, y, screenX, screenY,
-                        shiftDown, controlDown, altDown, metaDown, false, false,
-                        scrollX, scrollY, 0, 0,
-                        xTextUnits, xText, yTextUnits, yText,
-                        0, null);
-            }
-        };
-        FXRobotHelper.setInputAccessor(a);
-    }
-
     /**
      * Constructs new KeyEvent event with null source and target and KeyCode object directly specified.
      * @param source the source of the event. Can be null.