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

NLS: [ccjk] Extra mnemonic keys at standard filechooserdialog (open and save) in metal L&F

    Details

    • Subcomponent:
    • Resolved In Build:
      b45
    • CPU:
      x86
    • OS:
      windows
    • Verification:
      Verified

      Backports

        Description

        Java 7u6 b12
        windows xp, 7

        locales: all the four asian locales

        metal L&F

        Open standard file chooser dialog in java (open and save in metal L&F). There are extra mnemonic keys at the button label. In English, there is no mnemonic key. Attached are the screen shots.

        In the internal build of message drop 1 in 7u6. The mnemonic key on cancel button is removed. But for open and save button, there is still the mnemonic key.

        http://bej301328.cn.oracle.com/gatejava/test/jdk1/results/7u6/b00/jdk-x86-offline/win7-zh_TW/1339019750.jpg
        http://bej301328.cn.oracle.com/gatejava/test/jdk1/results/7u6/b00/jdk-x86-offline/win7-zh_CN/1339018227.jpg
        http://bej301328.cn.oracle.com/gatejava/test/jdk1/results/7u6/b00/jdk-x86-offline/win7-ko/1339012873.jpg
        http://bej301328.cn.oracle.com/gatejava/test/jdk1/results/7u6/b00/jdk-x86-offline/win7-ja/1339010398.jpg

        Above are for metal L&F.

          Issue Links

            Activity

            Hide
            alexsch Alexander Scherbatiy (Inactive) added a comment -
            BT2:EVALUATION

            According to the issue 5081721 the Open, Save and Cancel buttons should not have mnemonics for the FileChooser.

            However they existed in the *.properties files:
            ------------------------------------------
            FileChooser.cancelButtonText=\u53D6\u6D88
            FileChooser.cancelButtonMnemonic=67
            FileChooser.saveButtonText=\u4FDD\u5B58
            FileChooser.saveButtonMnemonic=83
            FileChooser.openButtonText=\u6253\u5F00
            FileChooser.openButtonMnemonic=79
            ------------------------------------------

            Because of this the convertiong tool adds the mnemonics to the end of the unified text and mnemonic properties:
            ------------------------------------------
            FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
            FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58(&S)
            FileChooser.openButton.textAndMnemonic=\u6253\u5F00(&O)
            ------------------------------------------

            The fix removes the unnecessary mnemonics for the FileChooser Open, Save and Cancel buttons.
            Show
            alexsch Alexander Scherbatiy (Inactive) added a comment - BT2:EVALUATION According to the issue 5081721 the Open, Save and Cancel buttons should not have mnemonics for the FileChooser. However they existed in the *.properties files: ------------------------------------------ FileChooser.cancelButtonText=\u53D6\u6D88 FileChooser.cancelButtonMnemonic=67 FileChooser.saveButtonText=\u4FDD\u5B58 FileChooser.saveButtonMnemonic=83 FileChooser.openButtonText=\u6253\u5F00 FileChooser.openButtonMnemonic=79 ------------------------------------------ Because of this the convertiong tool adds the mnemonics to the end of the unified text and mnemonic properties: ------------------------------------------ FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C) FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58(&S) FileChooser.openButton.textAndMnemonic=\u6253\u5F00(&O) ------------------------------------------ The fix removes the unnecessary mnemonics for the FileChooser Open, Save and Cancel buttons.
            Hide
            alexsch Alexander Scherbatiy (Inactive) added a comment -
            BT2:EVALUATION

            The fix consists of the 2 parts:
              1) Remove mnemonics from the FileChooser.cancelButton.textAndMnemonic property for locales different from the default in Basic resources.
              2) Add FileChooser.saveButton.textAndMnemonic and FileChooser.openButton.textAndMnemonic properties without mnemonics to the all Metal resources.

              So the Metal L&F will not have the mnemonics on the JFileChooser open and save buttons.
              The JFileChooser cancel button does not have a mnemonic in the default Basic resource. To be consistent the cancel button mnemonic is removed for the others Basic locales as well.
            Show
            alexsch Alexander Scherbatiy (Inactive) added a comment - BT2:EVALUATION The fix consists of the 2 parts:   1) Remove mnemonics from the FileChooser.cancelButton.textAndMnemonic property for locales different from the default in Basic resources.   2) Add FileChooser.saveButton.textAndMnemonic and FileChooser.openButton.textAndMnemonic properties without mnemonics to the all Metal resources.   So the Metal L&F will not have the mnemonics on the JFileChooser open and save buttons.   The JFileChooser cancel button does not have a mnemonic in the default Basic resource. To be consistent the cancel button mnemonic is removed for the others Basic locales as well.
            Show
            alexsch Alexander Scherbatiy (Inactive) added a comment - BT2:EVALUATION changeset: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/4b470e9017da

              People

              • Assignee:
                alexsch Alexander Scherbatiy (Inactive)
                Reporter:
                yhuang Yong Huang
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: