Package org.fest.swing.monitor
Class Context
java.lang.Object
org.fest.swing.monitor.Context
Understands a monitor that maps event queues to GUI components and GUI components to event event queues.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EventQueueMapping
Maps components to their corresponding event queues.private final Object
private final WindowEventQueueMapping
Maps unique event queues to the set of root windows found on each queue. -
Constructor Summary
ConstructorsConstructorDescriptionContext
(Toolkit toolkit, WindowEventQueueMapping windowEventQueueMapping, EventQueueMapping eventQueueMapping) -
Method Summary
Modifier and TypeMethodDescription(package private) void
addContextFor
(Component component) (package private) Collection<EventQueue>
Returns all known event queues.(package private) EventQueue
Return the event queue corresponding to the given component.(package private) void
removeContextFor
(Component component) (package private) Collection<Window>
Return all available root windows.(package private) EventQueue
private static Component
-
Field Details
-
windowEventQueueMapping
Maps unique event queues to the set of root windows found on each queue. -
eventQueueMapping
Maps components to their corresponding event queues. -
lock
-
-
Constructor Details
-
Context
Context(Toolkit toolkit) -
Context
Context(Toolkit toolkit, WindowEventQueueMapping windowEventQueueMapping, EventQueueMapping eventQueueMapping)
-
-
Method Details
-
rootWindows
Collection<Window> rootWindows()Return all available root windows. A root window is one that has anull
parent. Nominally this means a list similar to that returned by
, but in the case of anFrame.getFrames()
may return a few dialogs as well.Applet
- Returns:
- all available root windows.
-
storedQueueFor
-
removeContextFor
-
addContextFor
-
eventQueueFor
Return the event queue corresponding to the given component. In most cases, this is the same as
, but in the case of applets will bypass theToolkit.getSystemEventQueue()
AppContext
and provide the real event queue.- Parameters:
c
- the given component.- Returns:
- the event queue corresponding to the given component
-
topParentOf
-
allEventQueues
Collection<EventQueue> allEventQueues()Returns all known event queues.- Returns:
- all known event queues.
-