|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.SystemEventQueueUtilities
Swing internal utilities for dealing with the AWT system event queue. Four methods are exported, see the individual method javadoc for more information: addRunnableCanvas(), removeRunnableCanvas(), postRunnable(), queueComponentWorkRequest(). Note: most of the code in this class is no longer needed since we're no longer supporting Swing in 1.1.x VM's and in 1.2 we're guaranteed access to the AWT event queue. However all of the entry points, save postRunnable(), are still used.
RepaintManager
,
JRootPane
Nested Class Summary | |
private static class |
SystemEventQueueUtilities.ComponentWorkRequest
A Runnable with a component. |
private static class |
SystemEventQueueUtilities.RunnableCanvas
Applets don't have direct access to the AWT SystemEvent queue. |
private static class |
SystemEventQueueUtilities.RunnableCanvasGraphics
A no-op Graphics object for the RunnableCanvas component. |
private static class |
SystemEventQueueUtilities.RunnableEvent
Event type used for dispatching runnable objects for SwingUtilities.invokeLater() and SwingUtilities.invokeAndWait(). |
private static class |
SystemEventQueueUtilities.RunnableTarget
A dummy Component subclass that (only) handles RunnableEvents. |
private static class |
SystemEventQueueUtilities.SystemEventQueue
SystemEventQueue class. |
private static class |
SystemEventQueueUtilities.TimerQueueRestart
Runnable that will message the shared instance of the Timer Queue to restart. |
Field Summary | |
private static Object |
classLock
|
private static Object |
rootTableKey
|
Constructor Summary | |
(package private) |
SystemEventQueueUtilities()
|
Method Summary | |
(package private) static void |
addRunnableCanvas(JRootPane rootPane)
Associate a RunnableCanvas and a JRootPane to enable queuing events for the root pane's parent window's event dispatching thread. |
private static Map |
getRootTable()
|
private static ThreadGroup |
getThreadGroupSafely()
Return the current threads ThreadGroup, even on IE4.0. |
(package private) static Exception |
postRunnable(Runnable doRun,
Object lock)
Post an event to the AWT System event queue that, when dispatched, will invoke the specified Runnable. |
private static void |
postRunnableCanvasEvent(SystemEventQueueUtilities.RunnableEvent e)
Synchronized entry point to the applet support for AWT System event queue access. |
private static void |
processRunnableEvent(SystemEventQueueUtilities.RunnableEvent runnableEvent)
Calls RunnableEvent.doRun.run(). |
(package private) static void |
queueComponentWorkRequest(Component root)
This method is used by RepaintManager to queue a ComponentWorkRequest with invokeLater(). |
(package private) static void |
removeRunnableCanvas(JRootPane rootPane)
Remove the RunnableCanvas from the JRootPane and clear the internal bookeeping associated with it. |
(package private) static void |
restartTimerQueueThread()
Adds a RunnableEvent to all the remaining RunnableCanvases to restart the TimerQueues thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final Object classLock
private static final Object rootTableKey
Constructor Detail |
SystemEventQueueUtilities()
Method Detail |
private static Map getRootTable()
static void queueComponentWorkRequest(Component root)
static void addRunnableCanvas(JRootPane rootPane)
Called by JRootPane.addNotify() to set up the RunnableCanvas.
SystemEventQueueUtilities.RunnableCanvas
,
JRootPane.addNotify()
static void removeRunnableCanvas(JRootPane rootPane)
Called by JRootPane.removeNotify()
SystemEventQueueUtilities.RunnableCanvas
static Exception postRunnable(Runnable doRun, Object lock)
This method is only intended to support SwingUtilities.invokeLater() and SwingUtilities.invokeAndWait().
static void restartTimerQueueThread()
SystemEventQueueUtilities.RunnableCanvas.postRunnableEventToAll(javax.swing.SystemEventQueueUtilities.RunnableEvent)
private static void processRunnableEvent(SystemEventQueueUtilities.RunnableEvent runnableEvent)
private static void postRunnableCanvasEvent(SystemEventQueueUtilities.RunnableEvent e)
SystemEventQueueUtilities.RunnableCanvas.addRunnableEvent(javax.swing.SystemEventQueueUtilities.RunnableEvent)
,
SystemEventQueueUtilities.RunnableCanvas.update(java.awt.Graphics)
private static ThreadGroup getThreadGroupSafely()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |