| java.lang.Object abbot.tester.Robot
All known Subclasses: abbot.tester.ComponentTester,
Robot | public class Robot implements AWTConstants(Code) | | Provide a higher level of abstraction for user input (A Better Robot).
The Robot's operation may be affected by the following properties:
abbot.robot.auto_delay
Set this to a value representing the millisecond count in between
generated events. Usually just set to 100-200 if you want to slow down
the playback to simulate actual user input. The default is zero delay.
abbot.robot.mode
Set this to either "robot" or "awt" to designate the desired mode of event
generation. "robot" uses java.awt.Robot to generate events, while "awt"
stuffs events directly into the AWT event queue.
abbot.robot.event_post_delay
This is the maximum number of ms it takes the system to post an AWT event
in response to a Robot-generated event.
abbot.robot.default_delay
Base delay setting, acts as default value for the next two.
abbot.robot.popup_delay
Set this to the maximum time to wait for a menu to appear or be generated.
abbot.robot.component_delay
Set this to the maximum time to wait for a Component to become available.
The Robot class provides a generic solution for dealing with asynchronous
updates to the UI with the
Robot.wait(Condition,long,int) method.
This allows the testing thread to pause until a given component of data value
in a component is ready.
NOTE: Only use event queue synchronization (e.g.
Robot.invokeAndWait(Runnable) or
Robot.waitForIdle() when a
subsequent robot-level action is being applied to the results of a prior
action (e.g. focus, deiconify, menu selection). Otherwise, don't
introduce a mandatory delay (e.g. use
Robot.invokeLater(Runnable) ).
NOTE: If a robot action isn't reproduced properly, you may need to
introduce either additional events or extra delay. Adding enforced delay
for a given platform is usually preferable to generating additional events,
so always try that first, but be sure to restrict it to the platform in
question.
NOTE: Robot actions should never be invoked on the event dispatch
thread.
|
Constructor Summary | |
public | Robot() Default constructor. |
Method Summary | |
public void | activate(Window win) Activate the given window. | public static boolean | canMoveWindows() Returns whether it is possible to move windows that are not an
instance of Frame or Dialog. | public static boolean | canResizeWindows() Returns whether it is possible to resize windows that are not an
instance of Frame or Dialog. | public BufferedImage | capture(Rectangle bounds) Capture the contents of the given rectangle. | public BufferedImage | capture(Component comp) Capture the contents of the given component, sans any border or
insets. | public BufferedImage | capture(Component comp, boolean ignoreBorder) Capture the contents of the given component, optionally including the
border and/or insets. | final public void | click(Component comp) Click in the center of the given component. | final public void | click(Component comp, int mask) Click in the center of the given component, specifying which button. | final public void | click(Component comp, int x, int y) Click in the component at the given location. | final public void | click(Component comp, int x, int y, int mask) Click in the component at the given location with the given button. | public void | click(Component comp, int x, int y, int mask, int count) Click in the given part of the component. | public void | close(Window w) Invoke the window close operation. | public void | deiconify(Frame frame) | public void | delay(int ms) Sleep the given duration of ms. | protected static String | descriptiveClassName(Class cls) | public void | drag(Component src, int sx, int sy) Begin a drag operation using button 1.
This method is tuned for native drag/drop operations, so if you get
odd behavior, you might try using a simple
Robot.mousePress(Component,int,int) instead. | public void | drag(Component src, int sx, int sy, int buttons) Begin a drag operation using the given button mask.
This method is tuned for native drag/drop operations, so if you get
odd behavior, you might try using a simple
Robot.mousePress(Component,int,int,int) instead. | public void | dragOver(Component dst, int x, int y) Move the mouse appropriately to get from the source to the
destination. | public void | drop(Component target, int x, int y) End a drag operation, releasing the mouse button over the given target
location.
This method is tuned for native drag/drop operations, so if you get
odd behavior, you might try using a simple
Robot.mouseMove(Component,int,int) ,
Robot.mouseRelease() instead. | public Component | findFocusOwner() Return the Component which currently owns the focus. | protected void | fireAccessibleAction(Component context, AccessibleAction action, String name) | public void | focus(Component comp) Move keyboard focus to the given component. | public void | focus(Component comp, boolean wait) Move keyboard focus to the given component. | public static int | getAutoDelay() | public static String | getBorderTitle(Component c) | public static Class | getCanonicalClass(Class refClass) | protected Point | getCloseLocation(Container c) | public static String | getDescriptiveName(Component c) Return a descriptive name for the given component for use in UI
text (may be localized if appropriate and need not be re-usable
across locales. | public static String | getEventID(AWTEvent event) Return the symbolic name of the given event's ID. | public static int | getEventID(Class cls, String id) Return the numeric event ID corresponding to the given string. | public static int | getEventMode() Returns the current event-generation mode. | public static String | getEventModeDescription() | public static int | getEventPostDelay() | protected EventQueue | getEventQueue(Component c) Usually only needed when dealing with Applets. | public static String | getIconName(Component c) | protected Point | getIconifyLocation(Container c) Identify the coordinates of the iconify button where we can, returning
(0, 0) if we can't. | public static int | getIndex(Container parent, Component comp) Returns the index of the given component within the given container. | public static String | getLabel(Component c) | protected Point | getMaximizeLocation(Container c) Identify the coordinates of the maximize button where possible,
returning null if not. | protected Point | getMoveLocation(Container c) Return where the mouse usually grabs to move a window. | public static String | getName(Component c) | public static int | getPreferredRobotAutoDelay() Returns the appropriate auto delay for robot-generated events. | protected Point | getResizeLocation(Container c) Return where the mouse usually grabs to resize a window. | public static java.awt.Robot | getRobot() Returns a functioning instance of java.awt.Robot. | public static InputState | getState() Return a singleton InputState object. | public static String | getText(Component c) | public static String | getTitle(Component c) | public void | iconify(Frame frame) Iconify the given Frame. | public void | invokeAction(Runnable action) | public void | invokeAction(Component c, Runnable action) | public void | invokeAndWait(Component c, Runnable action) Post a runnable on the given component's event queue and wait for it
to finish. | public void | invokeAndWait(Runnable action) Run the given action on the event dispatch thread, but don't return
until it's been run. | public void | invokeLater(Component context, Runnable action) Post a runnable on the given component's event queue. | public void | invokeLater(Runnable action) Run the given action on the event dispatch thread. | protected boolean | isReadyForInput(Component c) | protected void | jitter(Component comp, int x, int y) | protected void | jitter(int x, int y) | public void | key(int keycode) Type the given keycode with no modifiers. | public void | key(int keycode, int modifiers) Type the given keycode with the given modifiers. | public void | keyPress(int keycode) | public void | keyRelease(int keycode) Send a key release event. | public void | keyString(String str) Type the given string. | public void | keyStroke(char ch) Type the given character. | public void | maximize(Frame frame) Make the window full size. | public void | mouseMove(Component comp) Move the pointer to the center of the given component. | public void | mouseMove(Component comp, int x, int y) Move the pointer to the given coordinates relative to the given
component. | public void | mousePress(int buttons) Send a button press event. | public void | mousePress(Component comp) | public void | mousePress(Component comp, int mask) | public void | mousePress(Component comp, int x, int y) | public void | mousePress(Component comp, int x, int y, int mask) Mouse down in the given part of the component. | public void | mouseRelease() Send a button release event for button 1. | public void | mouseRelease(int buttons) Send a button release event. | public void | move(Container comp, int newx, int newy) Move the given Frame/Dialog to the requested location. | public void | moveBy(Container comp, int dx, int dy) Move the given Window by the given amount. | public void | normalize(Frame frame) | protected void | postEvent(Component comp, AWTEvent ev) Post the given event to the corresponding event queue for the given
component. | protected boolean | postInvocationEvent(EventQueue eq, Toolkit toolkit, long timeout) | protected boolean | queueBlocked() Check for a blocked event queue (symptomatic of an active w32 AWT
popup menu). | public void | reset() | public void | resize(Container comp, int width, int height) Resize the given Frame/Dialog to the given size. | public void | resizeBy(Container comp, int dx, int dy) Resize the given Frame/Dialog by the given amounts. | public Color | sample(int x, int y) Sample the color at the given point on the screen. | public Color | sample(Component c, int x, int y) Sample the color at the given point on the component. | public Color | sample(Component c, ComponentLocation loc) Sample the color at the given location on the component. | public void | selectAWTMenuItem(Frame frame, String path) Select the given menu item from the given Frame. | public void | selectAWTMenuItem(MenuComponent item) Select an AWT menu item. | public void | selectAWTMenuItemByLabel(Frame frame, String path) | public void | selectAWTPopupMenuItem(Component invoker, String path) Select the given menu item from a PopupMenu on the given Component.
The given String may be either a label or path of labels, but must
uniquely identify the menu item. | public void | selectAWTPopupMenuItem(MenuComponent item) Select an AWT popup menu item. | public void | selectAWTPopupMenuItemByLabel(Component invoker, String path) | public void | selectMenuItem(Component sameWindow, String path) Find and select the given menu item, by path. | public void | selectMenuItem(Component item) Find and select the given menu item. | public void | selectPopupMenuItem(Component invoker, ComponentLocation loc, String path) | public void | sendEvent(AWTEvent event) Send the given event as appropriate to the event-generation mode. | public static void | setAutoDelay(int ms) Allow this to be adjusted, mostly for testing. | public static void | setEventMode(int mode) Set the event-generation mode. | public static void | setEventPostDelay(int delay) | public void | setModifiers(int modifiers, boolean press) Press or release the appropriate modifiers corresponding to the given
mask. | public Component | showPopupMenu(Component invoker) Attempt to display a popup menu at center of the component. | public Component | showPopupMenu(Component invoker, int x, int y) Attempt to display a popup menu at the given coordinates. | public static String | simpleClassName(Class cls) Strip the package from the class name. | public void | sleep() Sleep for a little bit, measured in UI time. | public static String | toHierarchyPath(Component c) Provides the hierarchic path of the given component by component
class, e.g. | public static String | toString(Component comp) Provides a more concise representation of the component than the
default Component.toString(). | public static String | toString(Object obj) Provide a string representation of the given component (Component or
MenuComponent. | public static String | toString(AWTEvent event) Provide a more concise representation of the event than the default
AWTEvent.toString(). | final protected static boolean | useScreenMenuBar() OS X using screenMenuBar actually uses an AWT menu as the live
component. | protected boolean | userMovable(Component comp) Return whether it is possible for the user to move the given
component. | protected boolean | userResizable(Component comp) Return whether it is possible for the user to resize the given
component. | public void | wait(Condition condition) Wait for the given Condition to return true. | public void | wait(Condition condition, long timeout) Wait for the given Condition to return true, waiting for timeout ms.
throws: WaitTimedOutError - if the timeout is exceeded. | public void | wait(Condition condition, long timeout, int interval) Wait for the given Condition to return true, waiting for timeout ms,
polling at the given interval. | public void | waitForIdle() Wait for an idle AWT event queue. |
EM_AWT | public static int EM_AWT(Code) | | Post events to the AWT event queue.
|
EM_ROBOT | public static int EM_ROBOT(Code) | | Use java.awt.Robot to generate events.
|
IDLE_TIMEOUT | protected static long IDLE_TIMEOUT(Code) | | |
MOUSELESS_MODIFIER | final public static String MOUSELESS_MODIFIER(Code) | | |
MOUSELESS_MODIFIER_MASK | final public static int MOUSELESS_MODIFIER_MASK(Code) | | |
componentDelay | public static int componentDelay(Code) | | Delay before failing to find a component that should be visible.
|
defaultDelay | public static int defaultDelay(Code) | | Base delay setting.
|
popupDelay | protected static int popupDelay(Code) | | Delay before failing to find a popup menu that should appear.
|
Robot | public Robot()(Code) | | Default constructor.
|
activate | public void activate(Window win)(Code) | | Activate the given window.
|
canMoveWindows | public static boolean canMoveWindows()(Code) | | Returns whether it is possible to move windows that are not an
instance of Frame or Dialog. Most X11 window managers will allow
this, but stock Macintosh and Windows do not.
|
canResizeWindows | public static boolean canResizeWindows()(Code) | | Returns whether it is possible to resize windows that are not an
instance of Frame or Dialog. Most X11 window managers will allow
this, but stock Macintosh and Windows do not.
|
capture | public BufferedImage capture(Component comp)(Code) | | Capture the contents of the given component, sans any border or
insets. This should only be used on components that do not use a LAF
UI, or the results will not be consistent across platforms.
|
capture | public BufferedImage capture(Component comp, boolean ignoreBorder)(Code) | | Capture the contents of the given component, optionally including the
border and/or insets. This should only be used on components that do
not use a LAF UI, or the results will not be consistent across
platforms.
|
click | final public void click(Component comp)(Code) | | Click in the center of the given component.
|
click | final public void click(Component comp, int mask)(Code) | | Click in the center of the given component, specifying which button.
|
click | final public void click(Component comp, int x, int y)(Code) | | Click in the component at the given location.
|
click | final public void click(Component comp, int x, int y, int mask)(Code) | | Click in the component at the given location with the given button.
|
click | public void click(Component comp, int x, int y, int mask, int count)(Code) | | Click in the given part of the component. All other click methods
must eventually invoke this one. This method sometimes needs to be
redefined (i.e. JComponent to scroll before clicking).
|
close | public void close(Window w)(Code) | | Invoke the window close operation.
|
delay | public void delay(int ms)(Code) | | Sleep the given duration of ms.
|
drag | public void drag(Component src, int sx, int sy)(Code) | | Begin a drag operation using button 1.
This method is tuned for native drag/drop operations, so if you get
odd behavior, you might try using a simple
Robot.mousePress(Component,int,int) instead.
|
drag | public void drag(Component src, int sx, int sy, int buttons)(Code) | | Begin a drag operation using the given button mask.
This method is tuned for native drag/drop operations, so if you get
odd behavior, you might try using a simple
Robot.mousePress(Component,int,int,int) instead.
|
dragOver | public void dragOver(Component dst, int x, int y)(Code) | | Move the mouse appropriately to get from the source to the
destination. Enter/exit events will be generated where appropriate.
|
findFocusOwner | public Component findFocusOwner()(Code) | | Return the Component which currently owns the focus.
|
focus | public void focus(Component comp)(Code) | | Move keyboard focus to the given component. Note that the component
may not yet have focus when this method returns.
|
focus | public void focus(Component comp, boolean wait)(Code) | | Move keyboard focus to the given component.
|
getAutoDelay | public static int getAutoDelay()(Code) | | |
getDescriptiveName | public static String getDescriptiveName(Component c)(Code) | | Return a descriptive name for the given component for use in UI
text (may be localized if appropriate and need not be re-usable
across locales.
|
getEventID | public static String getEventID(AWTEvent event)(Code) | | Return the symbolic name of the given event's ID.
|
getEventID | public static int getEventID(Class cls, String id)(Code) | | Return the numeric event ID corresponding to the given string.
|
getEventMode | public static int getEventMode()(Code) | | Returns the current event-generation mode.
|
getEventModeDescription | public static String getEventModeDescription()(Code) | | |
getEventPostDelay | public static int getEventPostDelay()(Code) | | |
getIconifyLocation | protected Point getIconifyLocation(Container c)(Code) | | Identify the coordinates of the iconify button where we can, returning
(0, 0) if we can't.
|
getIndex | public static int getIndex(Container parent, Component comp)(Code) | | Returns the index of the given component within the given container.
|
getMaximizeLocation | protected Point getMaximizeLocation(Container c)(Code) | | Identify the coordinates of the maximize button where possible,
returning null if not.
|
getMoveLocation | protected Point getMoveLocation(Container c)(Code) | | Return where the mouse usually grabs to move a window. Center of the
top of the frame is usually a good choice.
|
getPreferredRobotAutoDelay | public static int getPreferredRobotAutoDelay()(Code) | | Returns the appropriate auto delay for robot-generated events.
|
getResizeLocation | protected Point getResizeLocation(Container c)(Code) | | Return where the mouse usually grabs to resize a window. The lower
right corner of the window is usually a good choice.
|
getRobot | public static java.awt.Robot getRobot()(Code) | | Returns a functioning instance of java.awt.Robot. If this method
returns null, it should be assumed that java.awt.Robot is unavailable
or non-functional on the current system.
|
getState | public static InputState getState()(Code) | | Return a singleton InputState object.
|
iconify | public void iconify(Frame frame)(Code) | | Iconify the given Frame. Don't support iconification of Dialogs at
this point (although maybe should).
|
invokeAndWait | public void invokeAndWait(Component c, Runnable action)(Code) | | Post a runnable on the given component's event queue and wait for it
to finish.
|
invokeAndWait | public void invokeAndWait(Runnable action)(Code) | | Run the given action on the event dispatch thread, but don't return
until it's been run.
|
invokeLater | public void invokeLater(Component context, Runnable action)(Code) | | Post a runnable on the given component's event queue. Useful when
driving multiple Applets, but is also useful to ensure an operation
happens on the event dispatch thread.
|
invokeLater | public void invokeLater(Runnable action)(Code) | | Run the given action on the event dispatch thread. This should be
used for any non-read-only methods invoked directly on a GUI
component.
NOTE: if you want to use the results of the action, use invokeAndWait
instead.
|
isReadyForInput | protected boolean isReadyForInput(Component c)(Code) | | Is the given component ready for robot input?
|
jitter | protected void jitter(int x, int y)(Code) | | |
key | public void key(int keycode)(Code) | | Type the given keycode with no modifiers.
|
key | public void key(int keycode, int modifiers)(Code) | | Type the given keycode with the given modifiers. Modifiers is a mask
from the available InputEvent masks.
|
keyPress | public void keyPress(int keycode)(Code) | | |
keyRelease | public void keyRelease(int keycode)(Code) | | Send a key release event.
|
keyString | public void keyString(String str)(Code) | | Type the given string.
|
keyStroke | public void keyStroke(char ch)(Code) | | Type the given character. Note that this sends the key to whatever
component currently has the focus.
|
maximize | public void maximize(Frame frame)(Code) | | Make the window full size. On 1.3.1, this is not reversible.
|
mouseMove | public void mouseMove(Component comp)(Code) | | Move the pointer to the center of the given component.
|
mouseMove | public void mouseMove(Component comp, int x, int y)(Code) | | Move the pointer to the given coordinates relative to the given
component.
|
mousePress | public void mousePress(int buttons)(Code) | | Send a button press event.
|
mousePress | public void mousePress(Component comp, int x, int y, int mask)(Code) | | Mouse down in the given part of the component. All other mousePress
methods must eventually invoke this one.
|
mouseRelease | public void mouseRelease()(Code) | | Send a button release event for button 1.
|
mouseRelease | public void mouseRelease(int buttons)(Code) | | Send a button release event.
|
move | public void move(Container comp, int newx, int newy)(Code) | | Move the given Frame/Dialog to the requested location.
|
moveBy | public void moveBy(Container comp, int dx, int dy)(Code) | | Move the given Window by the given amount.
|
postEvent | protected void postEvent(Component comp, AWTEvent ev)(Code) | | Post the given event to the corresponding event queue for the given
component.
|
postInvocationEvent | protected boolean postInvocationEvent(EventQueue eq, Toolkit toolkit, long timeout)(Code) | | whether we timed out waiting for the invocation to run |
queueBlocked | protected boolean queueBlocked()(Code) | | Check for a blocked event queue (symptomatic of an active w32 AWT
popup menu).
whether the event queue is blocked. |
reset | public void reset()(Code) | | |
resize | public void resize(Container comp, int width, int height)(Code) | | Resize the given Frame/Dialog to the given size.
|
resizeBy | public void resizeBy(Container comp, int dx, int dy)(Code) | | Resize the given Frame/Dialog by the given amounts.
|
sample | public Color sample(int x, int y)(Code) | | Sample the color at the given point on the screen.
|
sample | public Color sample(Component c, int x, int y)(Code) | | Sample the color at the given point on the component.
|
selectAWTMenuItem | public void selectAWTMenuItem(Frame frame, String path)(Code) | | Select the given menu item from the given Frame. The given String may
be either a label or path of labels, but must uniquely identify the
menu item. For example, "Copy" would be valid if there is only one
instance of that menu label under the MenuBar, otherwise you would
need to specify "Edit|Copy" to ensure the proper selection.
Note that this method doesn't require referencing the MenuComponent
directly as a parameter.
|
selectAWTMenuItem | public void selectAWTMenuItem(MenuComponent item)(Code) | | Select an AWT menu item.
|
selectAWTPopupMenuItem | public void selectAWTPopupMenuItem(Component invoker, String path)(Code) | | Select the given menu item from a PopupMenu on the given Component.
The given String may be either a label or path of labels, but must
uniquely identify the menu item. For example, "Copy" would be valid
if there is only one instance of that menu label under the MenuBar,
otherwise you would need to specify "Edit|Copy" to ensure the proper
selection. If there are more than one PopupMenu registerd on the
invoking component, you will need to prefix the PopupMenu name as
well, e.g. "popup0|Edit|Copy".
|
selectAWTPopupMenuItem | public void selectAWTPopupMenuItem(MenuComponent item)(Code) | | Select an AWT popup menu item.
|
selectMenuItem | public void selectMenuItem(Component sameWindow, String path)(Code) | | Find and select the given menu item, by path.
|
selectMenuItem | public void selectMenuItem(Component item)(Code) | | Find and select the given menu item.
|
sendEvent | public void sendEvent(AWTEvent event)(Code) | | Send the given event as appropriate to the event-generation mode.
|
setAutoDelay | public static void setAutoDelay(int ms)(Code) | | Allow this to be adjusted, mostly for testing.
|
setEventMode | public static void setEventMode(int mode)(Code) | | Set the event-generation mode.
throws: IllegalStateException - if the requested mode is EM_ROBOT andjava.awt.Robot is unavailable in the current environment. |
setEventPostDelay | public static void setEventPostDelay(int delay)(Code) | | |
setModifiers | public void setModifiers(int modifiers, boolean press)(Code) | | Press or release the appropriate modifiers corresponding to the given
mask.
|
showPopupMenu | public Component showPopupMenu(Component invoker)(Code) | | Attempt to display a popup menu at center of the component.
|
showPopupMenu | public Component showPopupMenu(Component invoker, int x, int y)(Code) | | Attempt to display a popup menu at the given coordinates.
|
simpleClassName | public static String simpleClassName(Class cls)(Code) | | Strip the package from the class name.
|
sleep | public void sleep()(Code) | | Sleep for a little bit, measured in UI time.
|
toHierarchyPath | public static String toHierarchyPath(Component c)(Code) | | Provides the hierarchic path of the given component by component
class, e.g. "JFrame:JRootPane:JPanel:JButton".
|
toString | public static String toString(Component comp)(Code) | | Provides a more concise representation of the component than the
default Component.toString().
|
toString | public static String toString(Object obj)(Code) | | Provide a string representation of the given component (Component or
MenuComponent.
|
toString | public static String toString(AWTEvent event)(Code) | | Provide a more concise representation of the event than the default
AWTEvent.toString().
|
useScreenMenuBar | final protected static boolean useScreenMenuBar()(Code) | | OS X using screenMenuBar actually uses an AWT menu as the live
component. The JXXX components exist, but are not effectively
active.
|
userMovable | protected boolean userMovable(Component comp)(Code) | | Return whether it is possible for the user to move the given
component.
|
userResizable | protected boolean userResizable(Component comp)(Code) | | Return whether it is possible for the user to resize the given
component.
|
wait | public void wait(Condition condition)(Code) | | Wait for the given Condition to return true. The default timeout may
be changed by setting abbot.robot.default_delay.
throws: WaitTimedOutError - if the default timeout (30s) is exceeded. See Also: Robot.wait(Conditionlongint) See Also: Robot.wait For a description of the use of this function to support lazy loading in class files |
wait | public void wait(Condition condition, long timeout)(Code) | | Wait for the given Condition to return true, waiting for timeout ms.
throws: WaitTimedOutError - if the timeout is exceeded. See Also: Robot.wait(Conditionlongint) See Also: Robot.wait For a description of the use of this function to support lazy loading in class files |
wait | public void wait(Condition condition, long timeout, int interval)(Code) | | Wait for the given Condition to return true, waiting for timeout ms,
polling at the given interval. This method can be used generically to
support components that are lazily loaded in the context of writing
testers or other testing code.
Take for example the simple case of trying to select an item in a list.
If the model for this list is populate asynchronously then you may need
to poll the list for a given amount of time until the item appears. This
is very common in an application that contains many long running tasks.
A general solution to the problem can be seen in this pseudo code:
wait(new Condition()
{
public boolean test()
{
return whether the ui element is avaliable
}
});
performAction(ui element);
If you are writing a tester method then it is a good idea to use a standard
timeout such as
Robot.componentDelay to ensure they are consistently
handled accross different testers.
throws: WaitTimedOutError - if the timeout is exceeded. |
waitForIdle | public void waitForIdle()(Code) | | Wait for an idle AWT event queue. Note that this is different from
the implementation of java.awt.Robot.waitForIdle() , which
may have events on the queue when it returns. Do NOT use this
method if there are animations or other continual refreshes happening,
since in that case it may never return.
|
|
|