<Swing Dev> RFR: 8216358: [accessibility] [macos] The focus is invisible when tab to "Image Radio Buttons" and "Image CheckBoxes"

Sergey Bylokhov serb at openjdk.java.net
Wed Feb 3 23:54:56 UTC 2021


On Wed, 3 Feb 2021 18:50:34 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> 8216358: [accessibility] [macos] The focus is invisible when tab to "Image Radio Buttons" and "Image CheckBoxes"

test/jdk/javax/swing/JCheckBox/ImageCheckboxFocus/ImageCheckboxTest.java line 68:

> 66:     public void performTest() throws Exception {
> 67:         try {
> 68:             BufferedImage imageFocus1 = null;

Probably the usage of Robot/Frame could be removed? Could you try to create the buffered image and button then paint the button to the graphics via button.paint(Graphics)? I guess in this case you can check the content of the buffered image directly w/o the robot.

src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java line 178:

> 176:             }
> 177: 
> 178:             altIcon.paintIcon(c, g, iconRect.x - offset, iconRect.y - offset);

Is it possible that due to offset on the left/top we will draw the icon outside the button bounds on the right/bottom?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2384


More information about the swing-dev mailing list