java类库详细讲解
源代码在线查看: basicaccessible.html
The Quintessential Accessible Object
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
javax.accessibility
[7 examples]
e691.
The Quintessential Accessible Object
You should try to subclass from JComponent or one of its descendents
since that will automatically make your object accessible. If that is
not possible, your object should implement Accessible.
import javax.accessibility.*;
public class BasicAccessible implements Accessible {
public AccessibleContext getAccessibleContext() {
return new AccessibleContext() {
// Implement all the abstract methods in this abstract class.
};
}
}
Related Examples
e692.
Setting an Accessible Name for an Image Button
e693.
Setting a Description for Image Icons
e694.
Setting a Mnemonic for Buttons
e695.
Setting a Mnemonic for a Menu
e696.
Associating a Label with a Component
e697.
Setting a Keyboard Accelerator for a Menu Item
© 2002 Addison-Wesley.