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

MenuShortcut.toString() form should be specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: docs
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description



      Name: apR10100 Date: 02/07/2002




      Specification for MenuShortcut.toString() should specify
      exactly form of the String that should be returned, since
      MenuShortcut should have consistent String representation
      across all platforms and implementations.

      --------------------------- JDK1.4 spec for MenuShortcut
      public String toString()
      Returns an internationalized description of the MenuShortcut.
      ---------------------------

      Currently JCK test verify that following should be returned:

      public String expectedToString(MenuShortcut menusc){
        int modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
        if (menusc.usesShiftModifier()) modifiers |= Event.SHIFT_MASK;
        String expected = KeyEvent.getKeyModifiersText(modifiers) + "+" + KeyEvent.getKeyText(menusc.getKey());
        return expected;
      }

      but test was invalidated by licensee request.

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            sharonz Sharon Zakhour (Inactive)
            Reporter:
            avpsunw Avp Avp (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: