On 08/25/2011 05:45 PM, Pavel Porvatov wrote:
Hi Charles,
On 07/26/2011 08:58 PM, Charles Lee wrote:
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
Hi guys,
Could some one take some to look at this patch?
I took a look at the patch and have several comments:
1. There is no AccessibleDescription for all resources, therefore I'd
prefer to remove filesAccessibleDescription
2. Please follow our code conventions
http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
a.
private String filesListAccessibleName=null;
=>
private String filesListAccessibleName = null;
b. Don't use TABs characters at all
c.
filesListAccessibleName
=UIManager.getString("FileChooser.filesListAccessibleName",l);
=>
filesListAccessibleName =
UIManager.getString("FileChooser.filesListAccessibleName", l);
etc.
3. As in the last CR fixing you should add the same resources to all
basic_XX.properties files
4. Why don't you use
putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY,
accessibleName) instead of "javax.accessibility.AccessibleContext
ac=list.getAccessibleContext();......"
Regards, Pavel
putClientProperty still does not work on my side. I can not find methods
which receive the accessible property changes. Is the diff attached you
supposed to be?
--
Yours Charles
diff --git src/share/classes/sun/swing/FilePane.java
src/share/classes/sun/swing/FilePane.java
index 9a95220..0f8e888 100644
--- src/share/classes/sun/swing/FilePane.java
+++ src/share/classes/sun/swing/FilePane.java
@@ -35,6 +35,7 @@ import java.util.*;
import java.util.List;
import java.util.concurrent.Callable;
+import javax.accessibility.AccessibleContext;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
@@ -82,6 +83,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 +454,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 +641,15 @@ public class FilePane extends JPanel implements
PropertyChangeListener {
if (listViewBorder != null) {
scrollpane.setBorder(listViewBorder);
}
+
+ /* Setting accessible name for File List in JFileChooser */
+
putClientProperty(javax.accessibility.AccessibleContext.ACCESSIBLE_NAME_PROPERTY,
filesListAccessibleName);
+
putClientProperty(javax.accessibility.AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY,
filesAccessibleDescription);
+
+ //AccessibleContext ac = list.getAccessibleContext();
+ //ac.setAccessibleName(filesListAccessibleName);
+ //ac.setAccessibleDescription(filesAccessibleDescription);
+
p.add(scrollpane, BorderLayout.CENTER);
return p;
}