Browse Prior Art Database

Transparent Accessibility/Automation improvements for Java programs on Windows

IP.com Disclosure Number: IPCOM000016716D
Original Publication Date: 2003-Jul-10
Included in the Prior Art Database: 2003-Jul-10
Document File: 2 page(s) / 43K

Publishing Venue

IBM

Abstract

A problem with automating control of a Java* program with a GUI containing a java.awt.list is that the list items, which are in random order, can only be accessed by ordinal position. This is solved by replacing the java.awt.List class with a new java class, compliant to the java.awt.List interface, but internally implemented using a scrolling panel of java.awt.Button's.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

  Transparent Accessibility/Automation improvements for Java programs on Windows

Automating control of a Java* program on windows with a GUI containing an instance of java.awt.List, can be done using Windows** Messages. (Enumerate the windows list, find the application, enumerate its windows, find the list, and then send windows messages to the list, asking it how many items it has, ask the list for the text within each list entry, find the item to be selected, then send the message to the list to tell it to select the list entry)

    However, in this scenario it is not possible to read text within the list entries due to the implementation of the java.awt.List on windows. This is because list items could only be selected/deselected by ordinal position, which (as this list was populated in random order) prevents the selection via messages of particular list items. As a result the strings cannot be read for the purposes of selecting items, for example, a screen reader would be unable to read the items for accessibility purposes.

    Current solutions [within automation for testing purposes] are to just select by ordindal position. This is not sufficient for all applications, where the list content cannot be known in advance, to supply the correct list positions.

    A simple approach to solving this problem is to replace the java.awt.List class with a new java class, that is compliant to the java.awt.List interface, but internally was implemented using other java.awt classes. For example, the list can be implemented as a scrolling panel of java.awt.Button 's. Unlike the list entries, the text within a java.awt.Button is readable by windows messages, and the containing scroll panel serves to keep the interface similar to a list.

    This new java.awt.List is then fed onto the jvm classpath ahead of the JRE classes, using the -Xbootclasspath parameter. Then when the application to be automated is ran, instead of it using a windows list to display its lists, they are displayed as scrolling panes full of buttons.

    When using thi...