public class WindowMonitor extends Object
Modifier and Type | Method and Description |
---|---|
Collection<EventQueue> |
allEventQueues()
Returns all known event queues.
|
EventQueue |
eventQueueFor(Component c)
Returns the event queue corresponding to the given component.
|
static WindowMonitor |
instance()
Returns the singleton instance of this class.
|
boolean |
isWindowReady(Window w)
Returns whether the window is ready to receive OS-level event input.
|
Collection<Window> |
rootWindows()
Return all available root windows.
|
public boolean isWindowReady(Window w)
true
before the WINDOW_OPENED
event is generated, and even after the
WINDOW_OPENED
is sent the window peer is not guaranteed to be ready.w
- the given window.public EventQueue eventQueueFor(Component c)
Component.getToolkit().getSystemEventQueue()
, but in the case of applets will bypass the
AppContext
and provide the real event queue.c
- the given component.public Collection<EventQueue> allEventQueues()
public Collection<Window> rootWindows()
Frame.getFrames()
, but in the case of an
Applet
may return a few dialogs as well.@RunsInEDT public static WindowMonitor instance()
Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.