JDK-4416026 : javax.swing.AbstractButton.setFocusPainted() spec needs to be broadened
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: generic
  • Submitted: 2001-02-16
  • Updated: 2001-04-26
  • Resolved: 2001-03-13
Related Reports
Duplicate :  
Relates :  
Description
javax.swing.AbstractButton.setFocusPainted() spec should be broadened to 
take into account the fact that some look and feels might not support 
painting the focus on the screen. 

Apple's MAC OS X Aqua Look and Feel doesn't support painting focus for 
subclasses of AbstractButton. Need to broaden the spec in order to enable 
Apple passing the JCK. Approved by Lara Bunni.

The spec should be changed in the following way:

Replace the following in javax.swing.AbstractButton

"Sets whether focus should be painted
 b - if true, the focus state is painted"

with ->

"Provides a hint to the look and feel whether focus should be painted
b - if true, the look and feel is advised to paint the focus."

======================================
Here is the excerpt of Apple's message :

Date: Thu, 15 Feb 2001 15:27:38 -0800
From: Peri Frantz <###@###.###>
Subject: Re: JCK,  Mac Aqua Look & Feel, and traversable focus
Cc: Peri Frantz <###@###.###>, Blaine Garst <###@###.###>, Peter Steinauer <###@###.###>, Barry Langdon-Lassagne <###@###.###>, Steve Naroff <###@###.###>
To: Kirill Soshalsky <###@###.###>
Content-Transfer-Encoding: 7bit

.....

"Aqua does not support the concept of keyboard traversable focus for all 
components.  For Java, we have implemented traversable focus for all 
components but for some components, the focus is not visible."

Comments
SUGGESTED FIX Replace the following in javax.swing.AbstractButton "Sets whether focus should be painted b - if true, the focus state is painted" with -> "Provides a hint to the look and feel whether focus should be painted b - if true, the look and feel is advised to paint the focus."
11-06-2004

EVALUATION focusPainted is just one of many Swing properties where we need to clarify whether the property is a suggestion or an order. We can find these by searching the javax/swing source code for "boolean is.*()" and then (as necessary) modify the javadoc for both methods of the is/set pair. kathleen.walrath@Eng 2001-02-16
16-02-2001