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

possible hardcoded mnemonic for JFileChooser metal and motif l&f

    Details

    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      x86
    • OS:
      linux_redhat_5.0

      Backports

        Description

        As seen in following, 3 mnemonic keys seems to be hardcoded and making them unable to localize. Please consider externalizing them to src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties for example.

        src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java

                    "FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
                    "FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
                    "FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
        Similar hardcode also found in motif L&F.

        src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java

                    "FileChooser.pathLabelMnemonic", new Integer(KeyEvent.VK_P), // 'p'
                    "FileChooser.filterLabelMnemonic", new Integer (KeyEvent.VK_R), // 'r'
                    "FileChooser.foldersLabelMnemonic", new Integer (KeyEvent.VK_L), // 'l'
                    "FileChooser.filesLabelMnemonic", new Integer (KeyEvent.VK_I), // 'i'
                    "FileChooser.enterFileNameLabelMnemonic", new Integer (KeyEvent.VK_N), // 'n'

        Since following keys in src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_xx.properties being translated, in some languages mnemonic character is not in label string and won't show up in gui.

        FileChooser.pathLabelText=Enter path or folder name:
        FileChooser.filterLabelText=Filter
        FileChooser.foldersLabelText=Folders
        FileChooser.filesLabelText=Files
        FileChooser.enterFileNameLabelText=Enter file name:
        FileChooser.enterFolderNameLabelText=Enter folder name:

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rupashka Pavel Porvatov (Inactive)
                  Reporter:
                  ogino Shinya Ogino (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: