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

Accelerator texts not aligned correctly in RTL menus

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      Any version of Tiger and Mustang

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      The menu accelerators under RTL layout are not aligned correctly.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create an application with different menu items and set frame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
      The accelerator texts are not aligned and many of them are cur by the window itself. See many screenshots of Metal, Windows and third-party LAFs that inherit them at http://weblogs.java.net/blog/kirillcool/archive/2006/02/aligning_menu_i_1.html

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Accelerator texts are aligned
      ACTUAL -
      Accelerator texts are partlt cut and not aligned

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      As described in https://looks.dev.java.net/issues/show_bug.cgi?id=111 the line

       accOffset = maxValue - acceleratorRect.width;

      (613 in Tiger) should be replaced by

       accOffset = menuItem.getComponentOrientation().isLeftToRight()
           ? maxValue - acceleratorRect.width
           : acceleratorRect.width - maxValue;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mlapshin Mikhail Lapshin (Inactive)
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: