7032018: The file list in JFileChooser does not have an accessible name
Reviewed-by: rupashka
Contributed-by: Charles Lee <littlee@linux.vnet.ibm.com>
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties Wed Sep 21 17:08:02 2011 +0400
@@ -91,6 +91,9 @@
FileChooser.helpButtonToolTipText=FileChooser help
FileChooser.directoryOpenButtonToolTipText=Open selected directory
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Preview
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=FileChooser-Hilfe
FileChooser.directoryOpenButtonToolTipText=Ausgew\u00E4hltes Verzeichnis \u00F6ffnen
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Vorschau
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=Ayuda del Selector de Archivos
FileChooser.directoryOpenButtonToolTipText=Abrir directorio seleccionado
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Presentaci\u00F3n Preliminar
ColorChooser.okText=Aceptar
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=Aide du s\u00E9lecteur de fichiers
FileChooser.directoryOpenButtonToolTipText=Ouvre le r\u00E9pertoire s\u00E9lectionn\u00E9
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Aper\u00E7u
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=Guida FileChooser
FileChooser.directoryOpenButtonToolTipText=Apre la directory selezionata
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Anteprima
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059
FileChooser.directoryOpenButtonToolTipText=\u9078\u629E\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u958B\u304D\u307E\u3059
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=\u30D7\u30EC\u30D3\u30E5\u30FC
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=FileChooser \uB3C4\uC6C0\uB9D0
FileChooser.directoryOpenButtonToolTipText=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=\uBBF8\uB9AC\uBCF4\uAE30
ColorChooser.okText=\uD655\uC778
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=Ajuda do FileChooser
FileChooser.directoryOpenButtonToolTipText=Abrir diret\u00F3rio selecionado
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Visualizar
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=Hj\u00E4lp - Filv\u00E4ljare
FileChooser.directoryOpenButtonToolTipText=\u00D6ppna vald katalog
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=Granska
ColorChooser.okText=OK
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=FileChooser \u5E2E\u52A9
FileChooser.directoryOpenButtonToolTipText=\u6253\u5F00\u9009\u62E9\u7684\u76EE\u5F55
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=\u9884\u89C8
ColorChooser.okText=\u786E\u5B9A
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties Wed Sep 21 17:08:02 2011 +0400
@@ -90,6 +90,9 @@
FileChooser.helpButtonToolTipText=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E
FileChooser.directoryOpenButtonToolTipText=\u958B\u555F\u9078\u53D6\u7684\u76EE\u9304
+FileChooser.filesListAccessibleName=Files List
+FileChooser.filesDetailsAccessibleName=Files Details
+
############ COLOR CHOOSER STRINGS #############
ColorChooser.previewText=\u9810\u89BD
ColorChooser.okText=\u78BA\u5B9A
--- a/jdk/src/share/classes/sun/swing/FilePane.java Thu Sep 15 16:43:25 2011 +0400
+++ b/jdk/src/share/classes/sun/swing/FilePane.java Wed Sep 21 17:08:02 2011 +0400
@@ -35,6 +35,7 @@
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 @@
private JPanel currentViewPanel;
private String[] viewTypeActionNames;
+ private String filesListAccessibleName = null;
+ private String filesDetailsAccessibleName = null;
+
private JPopupMenu contextMenu;
private JMenu viewMenu;
@@ -450,6 +454,9 @@
gigaByteString = UIManager.getString("FileChooser.fileSizeGigaBytes", l);
fullRowSelection = UIManager.getBoolean("FileView.fullRowSelection");
+ filesListAccessibleName = UIManager.getString("FileChooser.filesListAccessibleName", l);
+ filesDetailsAccessibleName = UIManager.getString("FileChooser.filesDetailsAccessibleName", l);
+
renameErrorTitleText = UIManager.getString("FileChooser.renameErrorTitleText", l);
renameErrorText = UIManager.getString("FileChooser.renameErrorText", l);
renameErrorFileExistsText = UIManager.getString("FileChooser.renameErrorFileExistsText", l);
@@ -634,6 +641,9 @@
if (listViewBorder != null) {
scrollpane.setBorder(listViewBorder);
}
+
+ list.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesListAccessibleName);
+
p.add(scrollpane, BorderLayout.CENTER);
return p;
}
@@ -1228,6 +1238,8 @@
detailsTableModel.fireTableStructureChanged();
+ detailsTable.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesDetailsAccessibleName);
+
return p;
} // createDetailsView