JavaSoft - Sun MicroSystems
JAVA ACCESSIBILITY
Retrieving Text
Version 0.5
08 October 1997

[Home] [What is it?] [Overview of API Features] [API Reference]
[FAQ] [Tutorial] [Tools] [Changes] [JFC Home Page]

Techniques for retrieving text information in Java

Every accessible object that renders text in Java either implements interface Accessible, or has a Translator which does so on it's behalf (creating an object which speaks interface Accessible for that object).  Using the methods in interface Accessible, you can get the object's name, description, and if it has one, the object's AccessibleText.  Via AccessibleText, you can get detailed text information, broken down by letter, word and sentence, as well as character attribute information.

In addition to getting the text of an accessible object, every accessible object, whether it renders text or not, whether it has an AccessibleText or not, has certain graphics settings which can be retrieved via the Accessible interface.  These settings include foreground and background color, as well as the selected font, and font settings.
 

Specific recipies/techniques for getting information about text:


Java Logo Copyright© 1995-97 Sun Microsystems, Inc. All Rights Reserved.
To submit comments or suggestions about Java Accessibility, please send mail to access@sun.com.

Sun MicroSystems