abbot.tester
Class WindowTracker

java.lang.Object
  extended by abbot.tester.WindowTracker

public class WindowTracker
extends Object

Keep track of all known root windows, and all known showing/hidden/closed windows.


Field Summary
(package private) static int WINDOW_READY_DELAY
           
 
Constructor Summary
WindowTracker()
          Create an instance of WindowTracker which will track all windows coming and going on the current and subsequent app contexts.
 
Method Summary
 Collection getEventQueues()
          Returns all known event queues.
 EventQueue getQueue(Component c)
          Return the event queue corresponding to the given component.
 Collection getRootWindows()
          Return all available root Windows.
static WindowTracker getTracker()
          Only ever want one of these.
 boolean isWindowReady(Window w)
          Returns whether the window is ready to receive OS-level event input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOW_READY_DELAY

static int WINDOW_READY_DELAY
Constructor Detail

WindowTracker

WindowTracker()
Create an instance of WindowTracker which will track all windows coming and going on the current and subsequent app contexts. WARNING: if an applet loads this class, it will only ever see stuff in its own app context.

Method Detail

getTracker

public static WindowTracker getTracker()
Only ever want one of these.


isWindowReady

public boolean isWindowReady(Window w)
Returns whether the window is ready to receive OS-level event input. A window's "isShowing" flag may be set 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.


getQueue

public EventQueue getQueue(Component c)
Return the event queue corresponding to the given component. In most cases, this is the same as Component.getToolkit().getSystemEventQueue(), but in the case of applets will bypass the AppContext and provide the real event queue.


getEventQueues

public Collection getEventQueues()
Returns all known event queues.


getRootWindows

public Collection getRootWindows()
Return all available root Windows. A root Window is one that has a null parent. Nominally this means a list similar to that returned by Frame.getFrames(), but in the case of an Applet may return a few Dialogs as well.



Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge