Skip to Main Content
Java Swing, 2nd Edition
book

Java Swing, 2nd Edition

by Dave Wood, Robert Eckstein, Marc Loy, James Elliott, Brian Cole
November 2002
Intermediate to advanced content levelIntermediate to advanced
1278 pages
38h 26m
English
O'Reilly Media, Inc.
Content preview from Java Swing, 2nd Edition

Other Accessible Objects

Before going further, there are several simple objects in the accessibility package used by AccessibleContext that we should discuss in more detail.

The AccessibleState Class

Each accessible component can have one or more states associated with it. An assistive technology can query these states at any time to determine how best to deal with the component. The accessible states can only be retrieved, however, and not set. There are two classes that the Accessible package uses to handle states: AccessibleState and AccessibleStateSet.

The AccessibleState class contains an enumeration of static objects that define states that any accessible component can have. Note that a component can be in more than one state at any time. A list of the possible states that an accessible object can be in, along with a brief description of each, is shown in Table 25-3.

Table 25-3. AccessibleState constants

State

Meaning

ACTIVE

The window, dialog, or frame is the active one.

ARMED

The object, such as a button, has been pressed but not released, and the mouse cursor is still over the button.

BUSY

The object is busy processing and should not be interrupted.

CHECKED

The object is checked.

COLLAPSED

The object, such as a node in a tree, is collapsed.

EDITABLE

The object supports any form of editing.

ENABLED

The object is enabled.

EXPANDABLE

The object, such as a node in a tree, can report its children.

EXPANDED

The object, such as a node in a tree, is expanded.

FOCUSABLE

The object can accept the focus. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Threads, 3rd Edition

Java Threads, 3rd Edition

Scott Oaks, Henry Wong

Publisher Resources

ISBN: 0596004087Errata PageSupplemental Content