-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
6
-
None
-
generic
-
generic
Name: rr100577 Date: 02/14/2002
PROBLEM:
When starting a Java GUI application that includes multiples threads, for example an application that dynamically streams in data to be displayed, there is a period of time when AWT events can not be handled correctly. This can cause problems in the application itself in recovering from lost or out of sequence events.
PROPOSAL:
Allow the app to turn off the EventDispatchThread and dispatch
events under the control of the main thread. This eliminates
the extra thread and allows the app to process events when it is ready.
CHANGES:
EventDispatchThread.java:
// Returns the state of the AutoDispatch mode of the EventDispatchThread,
// which is true by default.
public boolean getAutoDispatch();
// Sets the state of the AutoDispatch mode of the EventDispatchThread.
public setAutoDispatch(boolean mode);
EventQueue.java
/**
* Dispatches an event. The manner in which the event is
* dispatched depends upon the type of the event and the
* type of the event's source object:
...
public void dispatchEvent(AWTEvent event);
// Convenience method for app to call for event delivery.
// In a loop it calls getNextEvent() and dispatchEvent() for each
// event on the EventQueue, until a shutdown event arrives.
public eventDispatchLoop();
======================================================================
- relates to
-
JDK-6249849 Consolidate the AWT-Windows thread and EventDispatchThread
-
- Open
-
-
JDK-4306192 Access to EventQueue functions too limited
-
- Closed
-
-
JDK-4516924 Request public access to pumpEvents(Conditional) type functionality.
-
- Closed
-