<Swing Dev> Fwd: The file list in JFileChooser does not have an accessible name.

Charles Lee littlee at linux.vnet.ibm.com
Mon Sep 12 06:28:43 UTC 2011


On 09/09/2011 08:25 PM, Pavel Porvatov wrote:
> Hi Charles,
>
> The fix looks fine except one detail. Some time ago I wrote:
>
> 4. It seems to complete fix we should add Accessible Name for JTable 
> in the FilePane#createDetailsView method
>
> What do you think about that?

I missed that point... I will try to find some time to fix it :=)

>
> Regards, Pavel
>> On 09/02/2011 06:41 PM, Pavel Porvatov wrote:
>>> Hi Charles,
>>>> On 09/01/2011 08:37 PM, Pavel Porvatov wrote:
>>>>> Hi Charles,
>>>>>> On 08/25/2011 05:45 PM, Pavel Porvatov wrote:
>>>>>>>
>>>>>> 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?
>>>>> Take a look at 
>>>>> javax.swing.JComponent.AccessibleJComponent#getAccessibleName
>>>>>
>>>>> ...
>>>>>             if (name == null) {
>>>>>                 name = 
>>>>> (String)getClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY);
>>>>>             }
>>>>> ...
>>>>>
>>>>>
>>>>> Below is FilePane patch that works on my PC:
>>>>>
>>>>> # hg diff src/share/classes/sun/swing/FilePane.java
>>>>> diff --git a/src/share/classes/sun/swing/FilePane.java 
>>>>> b/src/share/classes/sun/swing/FilePane.java
>>>>> --- a/src/share/classes/sun/swing/FilePane.java
>>>>> +++ b/src/share/classes/sun/swing/FilePane.java
>>>>> @@ -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,8 @@
>>>>>      private JPanel currentViewPanel;
>>>>>      private String[] viewTypeActionNames;
>>>>>
>>>>> +    private String filesListAccessibleName = null;
>>>>> +
>>>>>      private JPopupMenu contextMenu;
>>>>>      private JMenu viewMenu;
>>>>>
>>>>> @@ -450,6 +453,8 @@
>>>>>          gigaByteString = 
>>>>> UIManager.getString("FileChooser.fileSizeGigaBytes", l);
>>>>>          fullRowSelection = 
>>>>> UIManager.getBoolean("FileView.fullRowSelection");
>>>>>
>>>>> +        filesListAccessibleName = 
>>>>> UIManager.getString("FileChooser.filesListAccessibleName",l);
>>>>> +
>>>>>          renameErrorTitleText = 
>>>>> UIManager.getString("FileChooser.renameErrorTitleText", l);
>>>>>          renameErrorText = 
>>>>> UIManager.getString("FileChooser.renameErrorText", l);
>>>>>          renameErrorFileExistsText = 
>>>>> UIManager.getString("FileChooser.renameErrorFileExistsText", l);
>>>>> @@ -634,6 +639,9 @@
>>>>>          if (listViewBorder != null) {
>>>>>              scrollpane.setBorder(listViewBorder);
>>>>>          }
>>>>> +
>>>>> +        
>>>>> list.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, 
>>>>> filesListAccessibleName);
>>>>> +
>>>>>          p.add(scrollpane, BorderLayout.CENTER);
>>>>>          return p;
>>>>>      }
>>>>>
>>>>> I used attached test for checking...
>>>>>
>>>>> Regards, Pavel
>>>> Great, it works, though I do not know why it does not work before....
>>>>
>>>> So, Pavel my question is still there:
>>>>
>>>> I do not get "There is no AccessibleDescription for all resources". 
>>>> Do you mean it is not in all the resource file (*.properties) or do 
>>>> you mean not all accessible class has accessible description?
>>> I meant that we don't add accessible descriptions, therefore I'd 
>>> like to remove FileChooser.filesAccessibleDescription from the patch.
>>>
>>> Regards, Pavel
>> Ok. So the new patch goes to (attached):
>>
>>
>> -- 
>> Yours Charles
>


-- 
Yours Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20110912/e5be8c01/attachment.html>


More information about the swing-dev mailing list