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

java.awt.MenuBar.setFont() spec needs to be relaxed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • docs
    • beta
    • generic
    • solaris_2.6

      On some platforms, native MenuBar/MenuItem might not have the ability to change the fonts in it. Due to that, there's no way of implementing correct
      setFont() behavior for such a MenuBar/MenuItem.

      Specifically, APPLE's MAC OS X graphic library doesn't allow setting fonts
      in the MenuBar/MenuItem. Need to relax the MenuBar/MenuItem.setFont() spec in order for Apple to be able to provide compatible jdk implementation.

      Since MenuBar/MenuItem inherit setFont() from awt.MenuComponent,
      I propose to add the following sentence to the java.awt.MenuComponent.setFont()
      spec:
        "setFont() might not work if underlying native menucomponent
      does not support setting of the font"

      This bug is related to another bug 4414599, which reports the
      fact that MenuBar.setFont() behavior is also incorrect in our reference
      implementation.

      Please see the following message from Apple:

      Date: Mon, 5 Feb 2001 18:53:55 -0800
      From: Peri Frantz <###@###.###>
      Cc: Peter Steinauer <###@###.###>, Barry Langdon-Lassagne <###@###.###>, Peri Frantz <###@###.###>
      To: Kirill Soshalsky <###@###.###>
      Subject: Exclusion Request for MenuBarTest0001

      Kirill,

      We've got another Exclusion request, based on platform dependent
      behavior.

      MenuBarTest0001 (jrt attached) assumes that the font, font size, and
      font style in the menubar is setable. This is not true on a Macintosh.

      Thanks, once again, Peri

      <Attachment missing>

            sharonz Sharon Zakhour (Inactive)
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: