On 07/06/2011 11:26 PM, Pavel Porvatov wrote:
Hi Charles,
On 04/13/2011 06:41 PM, Pavel Porvatov wrote:
Hi Charles,
On 03/30/2011 06:19 PM, Pavel Porvatov wrote:
Hi Charles,
-------- Original Message --------
Subject: The file list in JFileChooser does not have an
accessible name.
Date: Thu, 24 Mar 2011 17:23:25 +0800
From: Charles Lee <litt...@linux.vnet.ibm.com>
<mailto:litt...@linux.vnet.ibm.com>
To: swing-dev@openjdk.java.net
<mailto:swing-dev@openjdk.java.net>, litt...@linux.vnet.ibm.com
<mailto:litt...@linux.vnet.ibm.com>
Hi guys,
Start the SwingSet2.jar along with a accessibility tools (Scout), click
the JFileChooser and Show Plain JFileChooser, we will see an open
windows with file list inside. The file list does not have Name and
Description [1]. With a patch [2] attached, the name and description
will show as File List [3].
[1] NoDescriptionName.png (attached)
[2] patch (attached)
[3] WithDescriptionName.png (attached)
I filed bug 7032018 (The file list in JFileChooser does not have
an accessible name). It's not accessible on bugs.sun.com now, I
believe because of "Some bugs don't show up in the database for
some time because of delays in processing."
Thanks, Pavel
Hi Pavel,
Does the change make into the code? Can I have the changeset of it?
Nobody is working on this CR now, it just ACCEPTED... You can trace
status of the bug here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7032018
Regards, Pavel
Hello Pavel, it's me, again :-)
Is there any progress on this CR? Is ok if I move this issue to openjdk8?
No progress. The issue is targeted to jdk8 already...
Regards, Pavel
Hi guys,
I have tested this issue on the openjdk8. It still there (Please check
the first mail this thread: NoDescriptionName.png)
And with the patch (attached, rebase on the jdk8),
The problem gone away.
Would anyone interested in this issue this time?
--
Yours Charles
diff --git
src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties
src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties
index 109538a..a2ddfa3 100644
---
src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties
+++
src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties
@@ -91,6 +91,9 @@ FileChooser.updateButtonToolTipText=Update directory listing
FileChooser.helpButtonToolTipText=FileChooser help
FileChooser.directoryOpenButtonToolTipText=Open selected directory
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesAccessibleDescription=Files List
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Preview
ColorChooser.okText=OK
diff --git src/share/classes/sun/swing/FilePane.java
src/share/classes/sun/swing/FilePane.java
index 5bf5c1f..98c9f5f 100644
--- src/share/classes/sun/swing/FilePane.java
+++ src/share/classes/sun/swing/FilePane.java
@@ -82,6 +82,9 @@ public class FilePane extends JPanel implements
PropertyChangeListener {
private JPanel currentViewPanel;
private String[] viewTypeActionNames;
+ private String filesListAccessibleName=null;
+ private String filesAccessibleDescription=null;
+
private JPopupMenu contextMenu;
private JMenu viewMenu;
@@ -450,6 +453,9 @@ public class FilePane extends JPanel implements
PropertyChangeListener {
gigaByteString = UIManager.getString("FileChooser.fileSizeGigaBytes",
l);
fullRowSelection = UIManager.getBoolean("FileView.fullRowSelection");
+ filesListAccessibleName
=UIManager.getString("FileChooser.filesListAccessibleName",l);
+
filesAccessibleDescription=UIManager.getString("FileChooser.filesAccessibleDescription",l);
+
renameErrorTitleText =
UIManager.getString("FileChooser.renameErrorTitleText", l);
renameErrorText = UIManager.getString("FileChooser.renameErrorText",
l);
renameErrorFileExistsText =
UIManager.getString("FileChooser.renameErrorFileExistsText", l);
@@ -634,6 +640,14 @@ public class FilePane extends JPanel implements
PropertyChangeListener {
if (listViewBorder != null) {
scrollpane.setBorder(listViewBorder);
}
+
+ /* Setting accessible name for File List in JFileChooser */
+ javax.accessibility.AccessibleContext ac=list.getAccessibleContext();
+ if(ac != null) {
+ ac.setAccessibleName(filesListAccessibleName);
+ ac.setAccessibleDescription(filesAccessibleDescription);
+ }
+
p.add(scrollpane, BorderLayout.CENTER);
return p;
}