-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
1.0.1
-
None
-
x86
-
windows_nt
This is an RFE for a new API in Tiger:
Applications that must, in their event handlers, block for any reason, are
suggested to start a new event pump. There is no publically api to do this.
This leaves 2 alternatives to the application:
1.) The application can contain it's own copy of EventDispatchThread.pumpEvents,
EventDispatchThread.pumpOneEvent, and EventQueue.dispatchEvent.
- This is a problem in the application for foward compatibility. if
any of these functions significantly change, the application will need to
be re-written.
2.) The application can create and show a dummy modal dialog.
- Although this has thge desired side effect of creating a secondary
event pump, it looks cheesy if the application has no suitable content for
this dialog. There is no way to create the dialog unseen, by either being
off the screen, or being initially z-ordered behind some other top level
Component.
It would be best if the application could just make a call such as:
EventQueue.pumpEvents(Conditional cond).
This functionality is currently needed by plugin:
- When event handler calls a class in an applet that must be dynamically
downloaded, the EventDispatchThread must block untill the code is
downloaded from the net.
And by Java Web Start:
- When event handler code in an application calls a web start api that requires
confirmation from the user thru a security dialog, that dialog must be runn on
a seperate AppContext. The event handler thread must wait for the other
context to return the users choice.
Applications that must, in their event handlers, block for any reason, are
suggested to start a new event pump. There is no publically api to do this.
This leaves 2 alternatives to the application:
1.) The application can contain it's own copy of EventDispatchThread.pumpEvents,
EventDispatchThread.pumpOneEvent, and EventQueue.dispatchEvent.
- This is a problem in the application for foward compatibility. if
any of these functions significantly change, the application will need to
be re-written.
2.) The application can create and show a dummy modal dialog.
- Although this has thge desired side effect of creating a secondary
event pump, it looks cheesy if the application has no suitable content for
this dialog. There is no way to create the dialog unseen, by either being
off the screen, or being initially z-ordered behind some other top level
Component.
It would be best if the application could just make a call such as:
EventQueue.pumpEvents(Conditional cond).
This functionality is currently needed by plugin:
- When event handler calls a class in an applet that must be dynamically
downloaded, the EventDispatchThread must block untill the code is
downloaded from the net.
And by Java Web Start:
- When event handler code in an application calls a web start api that requires
confirmation from the user thru a security dialog, that dialog must be runn on
a seperate AppContext. The event handler thread must wait for the other
context to return the users choice.
- duplicates
-
JDK-4818839 SequencedEvent focus bug in EventQueue pop.
-
- Closed
-
- relates to
-
JDK-4638307 Event Dispatch On Main Thread
-
- Closed
-