5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package org.jemmy.input; 26 27 28 import java.awt.EventQueue; 29 import java.awt.image.BufferedImage; 30 import java.io.BufferedReader; 31 import java.io.File; 32 import java.io.IOException; 33 import java.io.InputStreamReader; 34 import java.io.ObjectInputStream; 35 import java.io.ObjectOutputStream; 36 import java.io.OptionalDataException; 37 import java.io.PrintWriter; 38 import java.lang.reflect.Field; 39 import java.lang.reflect.InvocationTargetException; 40 import java.lang.reflect.Modifier; 41 import java.net.ServerSocket; 42 import java.net.Socket; 43 import java.net.UnknownHostException; 44 import java.util.Arrays; 45 import java.util.HashSet; 46 import java.util.Set; 47 import java.util.logging.Level; 48 import java.util.logging.Logger; 49 import org.jemmy.JemmyException; 50 import org.jemmy.Rectangle; 51 import org.jemmy.env.Environment; 52 import org.jemmy.env.Timeout; 53 import org.jemmy.image.AWTImage; 54 import org.jemmy.image.Image; 55 import org.jemmy.image.PNGDecoder; 56 import org.jemmy.image.PNGEncoder; 57 import org.jemmy.timing.State; 58 import org.jemmy.timing.Waiter; 59 import org.jemmy.interfaces.Keyboard.KeyboardButton; 60 import org.jemmy.interfaces.Mouse.MouseButton; 61 62 /** 63 * 64 * @author КАМ 65 */ 66 class RobotExecutor { 67 68 private static RobotExecutor instance; 69 private AWTMap awtMap = null; 70 71 public static RobotExecutor get() { 72 if (instance == null) { 73 instance = new RobotExecutor(); 74 } 75 return instance; 76 } | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 package org.jemmy.input.awt; 26 27 28 import java.awt.EventQueue; 29 import java.awt.image.BufferedImage; 30 import java.io.BufferedReader; 31 import java.io.File; 32 import java.io.IOException; 33 import java.io.InputStreamReader; 34 import java.io.ObjectInputStream; 35 import java.io.ObjectOutputStream; 36 import java.io.OptionalDataException; 37 import java.io.PrintWriter; 38 import java.lang.reflect.Field; 39 import java.lang.reflect.InvocationTargetException; 40 import java.lang.reflect.Modifier; 41 import java.net.ServerSocket; 42 import java.net.Socket; 43 import java.net.UnknownHostException; 44 import java.util.Arrays; 45 import java.util.HashSet; 46 import java.util.Set; 47 import java.util.logging.Level; 48 import java.util.logging.Logger; 49 import org.jemmy.JemmyException; 50 import org.jemmy.Rectangle; 51 import org.jemmy.env.Environment; 52 import org.jemmy.env.Timeout; 53 import org.jemmy.image.awt.AWTImage; 54 import org.jemmy.image.Image; 55 import org.jemmy.image.awt.PNGDecoder; 56 import org.jemmy.image.awt.PNGEncoder; 57 import org.jemmy.timing.State; 58 import org.jemmy.timing.Waiter; 59 import org.jemmy.interfaces.Keyboard.KeyboardButton; 60 import org.jemmy.interfaces.Mouse.MouseButton; 61 62 /** 63 * 64 * @author КАМ 65 */ 66 class RobotExecutor { 67 68 private static RobotExecutor instance; 69 private AWTMap awtMap = null; 70 71 public static RobotExecutor get() { 72 if (instance == null) { 73 instance = new RobotExecutor(); 74 } 75 return instance; 76 } |