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

RFE: Provide UIDefault for a PLAF's Menu Shortcut mask

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.1
    • client-libs



      Name: jk109818 Date: 04/10/2003


      A DESCRIPTION OF THE REQUEST :
      In AWT, we have Toolkit.getMenuShortcutKeyMask() to get us the platform's desired shortcut modifier for MenuItems. This can be used for Swing JMenuItems, but some people are of the school that in Swing, the "standard" shortcut mask should be determined by the look and feel, not the platform. There is a "Menu.shortcutKeys" item in javax.swing.UIDefaults, however this is set to Event.ALT_MASK in BasicLookAndFeel and unchanged in MetalLookAndFeel. That leads me to believe this is actually a mnemonic mask, not a menu shortcut mask.

      JUSTIFICATION :
      The idea is to make more agnostic code so that a developer can ensure that he's using the "appropriate" mask for his shortcuts across any look and feel. This is basically a design call... is it up to the look and feel to designate a shortcut key in the first place? Metal, for example, seems to use Ctrl across the board, whereas Aqua on the mac uses Meta (Command).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      A means of asking the look and feel what the menu shortcut mask is.
      No such means.
      (Review ID: 183825)
      ======================================================================

            Unassigned Unassigned
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: