Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4516924

Request public access to pumpEvents(Conditional) type functionality.

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • 1.0.1
    • client-libs
    • None
    • x86
    • windows_nt

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              mbronsonsunw Mike Bronson (Inactive)
              herrick Andy Herrick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: