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

Enhancements for Robot: getPopupTrigger(), getMouseButtons()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 5.0-pool
    • 5.0
    • client-libs
    • generic
    • generic

      A couple enhancements should be added to make Robot easier to use and more cross-platform:

      * getMouseButtons:
      There is presently no way to query the number of mouse buttons available on the system. It may be that different testing should be done on 3, 2, (or 1)-button systems. At this point, there is no way to make this distinction. Some programs assume that there are always 3 mouse buttons. Bug 4700242 was filed againast Solaris x86. The problem has to do with Robot attempting to press button 3 on a system configured with a 2-button mouse.

      * getPopupTrigger:
      There are many possible popup triggers across platforms: Button3-Press (X-Windows), Button3-Release (Windows), Button2-Press (X-Windows w/ a 2-button mouse), Control-Button1-Press (MacOS). The isPopupTrigger() method can detect all of these within the context of MOUSE_PRESSED and MOUSE_RELEASED events. However, you can't go the other way. There is no way to determine what mouse actions the Robot should perform to test popupMenu functionality on the current platform.

            Unassigned Unassigned
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: