test/lib/testlibrary/ExtendedRobot.java

Print this page

        

*** 21,40 **** * 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. */ - import sun.awt.ExtendedKeyCodes; - import sun.awt.SunToolkit; - import java.awt.AWTException; import java.awt.Robot; import java.awt.GraphicsDevice; import java.awt.Toolkit; import java.awt.Point; import java.awt.MouseInfo; import java.awt.event.InputEvent; /** * ExtendedRobot is a subclass of {@link java.awt.Robot}. It provides some convenience methods that are * ought to be moved to {@link java.awt.Robot} class. * <p> --- 21,38 ---- * 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. */ import java.awt.AWTException; import java.awt.Robot; import java.awt.GraphicsDevice; import java.awt.Toolkit; import java.awt.Point; import java.awt.MouseInfo; import java.awt.event.InputEvent; + import java.awt.event.KeyEvent; /** * ExtendedRobot is a subclass of {@link java.awt.Robot}. It provides some convenience methods that are * ought to be moved to {@link java.awt.Robot} class. * <p>
*** 176,187 **** * sync been completed * @throws sun.awt.SunToolkit.IllegalThreadException if called on the AWT event * dispatching thread */ public synchronized void waitForIdle(int delayValue) { ! SunToolkit.flushPendingEvents(); ! ((SunToolkit) Toolkit.getDefaultToolkit()).realSync(); delay(delayValue); } /** * Waits until all events currently on the event queue have been processed with delay --- 174,184 ---- * sync been completed * @throws sun.awt.SunToolkit.IllegalThreadException if called on the AWT event * dispatching thread */ public synchronized void waitForIdle(int delayValue) { ! super.waitForIdle(); delay(delayValue); } /** * Waits until all events currently on the event queue have been processed with delay
*** 380,390 **** * * @see #type(int) * @see java.awt.event.KeyEvent */ public void type(char c) { ! type(ExtendedKeyCodes.getExtendedKeyCodeForChar(c)); } /** * Types given array of characters one by one * --- 377,388 ---- * * @see #type(int) * @see java.awt.event.KeyEvent */ public void type(char c) { ! type(KeyEvent.getExtendedKeyCodeForChar(c)); ! System.out.println(); } /** * Types given array of characters one by one *