Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -47,25 +47,22 @@ public static void main(String[] args) throws Exception {
}

public void performTest() throws Exception {
try {
BufferedImage imageNoFocus = new BufferedImage(100, 50,
BufferedImage.TYPE_INT_ARGB);
BufferedImage imageFocus = new BufferedImage(100, 50,
BufferedImage.TYPE_INT_ARGB);
BufferedImage imageNoFocus = new BufferedImage(100, 50,
BufferedImage.TYPE_INT_ARGB);
BufferedImage imageFocus = new BufferedImage(100, 50,
BufferedImage.TYPE_INT_ARGB);

CustomCheckBox checkbox = new CustomCheckBox("Test", new MyIcon(Color.GREEN));
checkbox.setSize(100, 50);
checkbox.setFocused(false);
checkbox.paint(imageNoFocus.createGraphics());
checkbox.setFocused(true);
checkbox.paint(imageFocus.createGraphics());
CustomCheckBox checkbox = new CustomCheckBox("Test", new MyIcon(Color.GREEN));
checkbox.setSize(100, 50);
checkbox.setFocused(false);
checkbox.paint(imageNoFocus.createGraphics());
checkbox.setFocused(true);
checkbox.paint(imageFocus.createGraphics());

if (Util.compareBufferedImages(imageFocus, imageNoFocus)) {
ImageIO.write(imageFocus, "png", new File("imageFocus.png"));
ImageIO.write(imageNoFocus, "png", new File("imageNoFocus.png"));
throw new Exception("Changing focus is not visualized");
}
} finally {
if (Util.compareBufferedImages(imageFocus, imageNoFocus)) {
ImageIO.write(imageFocus, "png", new File("imageFocus.png"));
ImageIO.write(imageNoFocus, "png", new File("imageNoFocus.png"));
throw new Exception("Changing focus is not visualized");
}
}