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 EventQueueMappingMaps components to their corresponding event queues.private final Objectprivate final WindowEventQueueMappingMaps 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) voidaddContextFor(Component component) (package private) Collection<EventQueue>Returns all known event queues.(package private) EventQueueReturn the event queue corresponding to the given component.(package private) voidremoveContextFor(Component component) (package private) Collection<Window>Return all available root windows.(package private) EventQueueprivate 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 anullparent. 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()AppContextand 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.
-