start page | rating of books | rating of authors | reviews | copyrights

Book Home Java Enterprise in a Nutshell Search this book

Chapter 22. The javax.accessibility Package

The javax.accessibility package contains classes and interfaces that define the contract between an accessible application and an assistive technology, such as a screen reader for the vision impaired. All accessible GUI components implement the Accessible interface and must be able to return an AccessibleContext object. AccessibleContext is the main entry point for an assistive technology to obtain information about the component. The methods of AccessibleContext return instances of many of the other classes and interfaces in this package. Figure 22-1 shows the class hierarchy of this package, which is new in Java 1.2.

Typically, only GUI component developers and developers of assistive technologies need to use this package. Chapter 3, "Swing Programming Topics", contains an overview of accessibility.

figure

Figure 22-1. The javax.accessibility package

AccessibleJava 1.2
javax.accessibilityaccessible

This interface is the primary point of interaction between assistive technologies and accessible objects. All accessible objects implement the getAccessibleContext() method of this interface, providing a way for an assistive technology to obtain an AccessibleContext object that describes the accessible object. Component developers should implement this interface for their components, but application developers should never have to use it.

public abstract interface Accessible {
// Public Instance Methods
public abstract AccessibleContext getAccessibleContext ();
}

Implementations: Too many classes to list.

Passed To: AccessibleContext.setAccessibleParent(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.AccessibleJTreeNode()

Returned By: Too many methods to list.

Type Of: AccessibleContext.accessibleParent

AccessibleActionJava 1.2
javax.accessibility

This interface allows an assistive technology to obtain human-readable descriptions of the actions that an accessible object can perform and request that the object perform any one of them. Any accessible object that can perform one or more actions should return an AccessibleAction object from the getAccessibleAction() method of its AccessibleContext object. Applications never need to use or implement this interface.

public abstract interface AccessibleAction {
// Public Instance Methods
public abstract boolean doAccessibleAction (int i);
public abstract int getAccessibleActionCount ();
public abstract String getAccessibleActionDescription (int i);
}

Implementations: AccessibleHyperlink, javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.JComboBox.AccessibleJComboBox, javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

Returned By: AccessibleContext.getAccessibleAction(), javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleAction(), javax.swing.JComboBox.AccessibleJComboBox.getAccessibleAction(), javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleAction(), javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleAction(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleAction(), javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleAction()

AccessibleBundleJava 1.2
javax.accessibility

This class is the abstract superclass of both AccessibleRole and AccessibleState. It defines the localized toDisplayString() method. Applications never need to use this class.

public abstract class AccessibleBundle {
// Public Constructors
public AccessibleBundle ();
// Public Instance Methods
public String toDisplayString ();
public String toDisplayString (java.util.Locale locale);
// Public Methods Overriding Object
public String toString ();
// Protected Instance Methods
protected String toDisplayString (String resourceBundleName, java.util.Locale locale);
// Protected Instance Fields
protected String key ;
}

Subclasses: AccessibleRole, AccessibleState

AccessibleComponentJava 1.2
javax.accessibility

This interface allows an assistive technology to query and set basic graphical attributes for an accessible object. Any accessible object that displays itself on the screen should return an object of this type from the getAccessibleComponent() method of its AccessibleContext. Applications never need to use or implement this interface.

public abstract interface AccessibleComponent {
// Event Registration Methods (by event name)
public abstract void addFocusListener (java.awt.event.FocusListener l);
public abstract void removeFocusListener (java.awt.event.FocusListener l);
// Property Accessor Methods (by property name)
public abstract java.awt.Color getBackground ();
public abstract void setBackground (java.awt.Color c);
public abstract java.awt.Rectangle getBounds ();
public abstract void setBounds (java.awt.Rectangle r);
public abstract java.awt.Cursor getCursor ();
public abstract void setCursor (java.awt.Cursor cursor);
public abstract boolean isEnabled ();
public abstract void setEnabled (boolean b);
public abstract boolean isFocusTraversable ();
public abstract java.awt.Font getFont ();
public abstract void setFont (java.awt.Font f);
public abstract java.awt.Color getForeground ();
public abstract void setForeground (java.awt.Color c);
public abstract java.awt.Point getLocation ();
public abstract void setLocation (java.awt.Point p);
public abstract java.awt.Point getLocationOnScreen ();
public abstract boolean isShowing ();
public abstract java.awt.Dimension getSize ();
public abstract void setSize (java.awt.Dimension d);
public abstract boolean isVisible ();
public abstract void setVisible (boolean b);
// Public Instance Methods
public abstract boolean contains (java.awt.Point p);
public abstract Accessible getAccessibleAt (java.awt.Point p);
public abstract java.awt.FontMetrics getFontMetrics (java.awt.Font f);
public abstract void requestFocus ();
}

Implementations: javax.swing.Box.AccessibleBox, javax.swing.Box.Filler.AccessibleBoxFiller, javax.swing.CellRendererPane.AccessibleCellRendererPane, javax.swing.JApplet.AccessibleJApplet, javax.swing.JComponent.AccessibleJComponent, javax.swing.JDialog.AccessibleJDialog, javax.swing.JFrame.AccessibleJFrame, javax.swing.JList.AccessibleJList.AccessibleJListChild, javax.swing.JPopupMenu.WindowPopup.AccessibleWindowPopup, javax.swing.JTable.AccessibleJTable.AccessibleJTableCell, javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode, javax.swing.JWindow.AccessibleJWindow, javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

Returned By: AccessibleContext.getAccessibleComponent(), javax.swing.Box.AccessibleBox.getAccessibleComponent(), javax.swing.Box.Filler.AccessibleBoxFiller.getAccessibleComponent(), javax.swing.CellRendererPane.AccessibleCellRendererPane.getAccessibleComponent(), javax.swing.JApplet.AccessibleJApplet.getAccessibleComponent(), javax.swing.JComponent.AccessibleJComponent.getAccessibleComponent(), javax.swing.JDialog.AccessibleJDialog.getAccessibleComponent(), javax.swing.JFrame.AccessibleJFrame.getAccessibleComponent(), javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleComponent(), javax.swing.JPopupMenu.WindowPopup.AccessibleWindowPopup.getAccessibleComponent(), javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleComponent(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleComponent(), javax.swing.JWindow.AccessibleJWindow.getAccessibleComponent(), javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleComponent()

AccessibleContextJava 1.2
javax.accessibilityaccessible context

This abstract class defines methods that provide basic information about an accessible object. Every Accessible object must be able to return an AccessibleContext to describe itself. The methods of AccessibleContext are largely self-explanatory. They allow an assistive technology to query the name, description, role, parent, children, and so on of the accessible object. In addition to this generic accessibility information, a number of AccessibleContext methods return more specialized objects that contain more specialized types of accessibility information. For example, if an accessible object is a GUI component, getAccessibleComponent() returns an AccessibleComponent object that contains further details about the accessible object. Applications never have to use this class.

public abstract class AccessibleContext {
// Public Constructors
public AccessibleContext ();
// Public Constants
public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY ; ="AccessibleActiveDescendant"
public static final String ACCESSIBLE_CARET_PROPERTY ; ="AccessibleCaret"
public static final String ACCESSIBLE_CHILD_PROPERTY ; ="AccessibleChild"
public static final String ACCESSIBLE_DESCRIPTION_PROPERTY ; ="AccessibleDescription"
public static final String ACCESSIBLE_NAME_PROPERTY ; ="AccessibleName"
public static final String ACCESSIBLE_SELECTION_PROPERTY ; ="AccessibleSelection"
public static final String ACCESSIBLE_STATE_PROPERTY ; ="AccessibleState"
public static final String ACCESSIBLE_TEXT_PROPERTY ; ="AccessibleText"
public static final String ACCESSIBLE_VALUE_PROPERTY ; ="AccessibleValue"
public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY ; ="AccessibleVisibleData"
// Event Registration Methods (by event name)
public void addPropertyChangeListener (java.beans.PropertyChangeListener listener);
public void removePropertyChangeListener (java.beans.PropertyChangeListener listener);
// Property Accessor Methods (by property name)
public AccessibleAction getAccessibleAction (); constant
public abstract int getAccessibleChildrenCount ();
public AccessibleComponent getAccessibleComponent (); constant
public String getAccessibleDescription ();
public void setAccessibleDescription (String s);
public abstract int getAccessibleIndexInParent ();
public String getAccessibleName ();
public void setAccessibleName (String s);
public Accessible getAccessibleParent ();
public void setAccessibleParent (Accessible a);
public abstract AccessibleRole getAccessibleRole ();
public AccessibleSelection getAccessibleSelection (); constant
public abstract AccessibleStateSet getAccessibleStateSet ();
public AccessibleText getAccessibleText (); constant
public AccessibleValue getAccessibleValue (); constant
public abstract java.util.Locale getLocale () throws java.awt.IllegalComponentStateException;
// Public Instance Methods
public void firePropertyChange (String propertyName, Object oldValue, Object newValue);
public abstract Accessible getAccessibleChild (int i);
// Protected Instance Fields
protected String accessibleDescription ;
protected String accessibleName ;
protected Accessible accessibleParent ;
}

Subclasses: javax.swing.Box.AccessibleBox, javax.swing.Box.Filler.AccessibleBoxFiller, javax.swing.CellRendererPane.AccessibleCellRendererPane, javax.swing.JApplet.AccessibleJApplet, javax.swing.JComponent.AccessibleJComponent, javax.swing.JDialog.AccessibleJDialog, javax.swing.JFrame.AccessibleJFrame, javax.swing.JList.AccessibleJList.AccessibleJListChild, javax.swing.JPopupMenu.WindowPopup.AccessibleWindowPopup, javax.swing.JTable.AccessibleJTable.AccessibleJTableCell, javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode, javax.swing.JWindow.AccessibleJWindow, javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry

Returned By: Too many methods to list.

Type Of: javax.swing.Box.accessibleContext, javax.swing.Box.Filler.accessibleContext, javax.swing.CellRendererPane.accessibleContext, javax.swing.JApplet.accessibleContext, javax.swing.JColorChooser.accessibleContext, javax.swing.JComponent.accessibleContext, javax.swing.JDialog.accessibleContext, javax.swing.JFileChooser.accessibleContext, javax.swing.JFrame.accessibleContext, javax.swing.JWindow.accessibleContext

AccessibleHyperlinkJava 1.2
javax.accessibility

This abstract class is an AccessibleAction that describes a hyperlink or set of hyperlinks, such as those found in an HTML image map. In addition to the AccessibleAction methods, this class defines getAccessibleActionObject(), which should return an object describing the link, typically a java.net.URL object. getAccessibleActionAnchor() should return the object that displays the link. For HTML hypertext, this is the string or image that appears between the HTML <A> and </A> tags. Applications never need to use this class.

public abstract class AccessibleHyperlink implements AccessibleAction {
// Public Constructors
public AccessibleHyperlink ();
// Property Accessor Methods (by property name)
public abstract int getAccessibleActionCount (); Implements:AccessibleAction
public abstract int getEndIndex ();
public abstract int getStartIndex ();
public abstract boolean isValid ();
// Public Instance Methods
public abstract Object getAccessibleActionAnchor (int i);
public abstract Object getAccessibleActionObject (int i);
// Methods Implementing AccessibleAction
public abstract boolean doAccessibleAction (int i);
public abstract int getAccessibleActionCount ();
public abstract String getAccessibleActionDescription (int i);
}

Hierarchy: Object-->AccessibleHyperlink(AccessibleAction)

Subclasses: javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

Returned By: AccessibleHypertext.getLink(), javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport.getLink()

AccessibleHypertextJava 1.2
javax.accessibility

This interface extends AccessibleText. It allows an assistive technology to query the text of an accessible object and the hyperlinks contained in that text. Accessible components that display hyperlinked text should return an object of this type from the getAccessibleText() method of their AccessibleContext. The getLink() method of the AccessibleHypertext object should return AccessibleHyperlink objects describing the links. Applications never need to use or implement this interface.

public abstract interface AccessibleHypertext extends AccessibleText {
// Public Instance Methods
public abstract AccessibleHyperlink getLink (int linkIndex);
public abstract int getLinkCount ();
public abstract int getLinkIndex (int charIndex);
}

Hierarchy: (AccessibleHypertext(AccessibleText))

Implementations: javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport

AccessibleResourceBundleJava 1.2
javax.accessibility

This class is a java.util.ResourceBundle that contains all the localized strings for the javax.accessibility package. It is used internally by the package and is not intended for use by applications, components, or assistive technologies.

public class AccessibleResourceBundle extends java.util.ListResourceBundle {
// Public Constructors
public AccessibleResourceBundle ();
// Public Methods Overriding ListResourceBundle
public Object[ ][ ] getContents ();
}

Hierarchy: Object-->java.util.ResourceBundle-->java.util.ListResourceBundle-->AccessibleResourceBundle

AccessibleRoleJava 1.2
javax.accessibility

This class exists only to provide a type-safe enumeration of constants that may be legally returned by the getAccessibleRole() method of an AccessibleContext object. An AccessibleRole object describes the role or basic function of an accessible object. The predefined AccessibleRole objects describe the roles played by various Swing components. This set of predefined roles should be sufficient for most purposes, although a specialized component that performs a specialized role could create a new role constant for itself by subclassing AccessibleRole. AccessibleRole inherits toDisplayString() from it superclass. This method returns a localized human-readable string describing the role. Applications never need to use this class.

public class AccessibleRole extends AccessibleBundle {
// Protected Constructors
protected AccessibleRole (String key);
// Public Constants
public static final AccessibleRole ALERT ;
public static final AccessibleRole AWT_COMPONENT ;
public static final AccessibleRole CHECK_BOX ;
public static final AccessibleRole COLOR_CHOOSER ;
public static final AccessibleRole COLUMN_HEADER ;
public static final AccessibleRole COMBO_BOX ;
public static final AccessibleRole DESKTOP_ICON ;
public static final AccessibleRole DESKTOP_PANE ;
public static final AccessibleRole DIALOG ;
public static final AccessibleRole DIRECTORY_PANE ;
public static final AccessibleRole FILE_CHOOSER ;
public static final AccessibleRole FILLER ;
public static final AccessibleRole FRAME ;
public static final AccessibleRole GLASS_PANE ;
public static final AccessibleRole INTERNAL_FRAME ;
public static final AccessibleRole LABEL ;
public static final AccessibleRole LAYERED_PANE ;
public static final AccessibleRole LIST ;
public static final AccessibleRole MENU ;
public static final AccessibleRole MENU_BAR ;
public static final AccessibleRole MENU_ITEM ;
public static final AccessibleRole OPTION_PANE ;
public static final AccessibleRole PAGE_TAB ;
public static final AccessibleRole PAGE_TAB_LIST ;
public static final AccessibleRole PANEL ;
public static final AccessibleRole PASSWORD_TEXT ;
public static final AccessibleRole POPUP_MENU ;
public static final AccessibleRole PROGRESS_BAR ;
public static final AccessibleRole PUSH_BUTTON ;
public static final AccessibleRole RADIO_BUTTON ;
public static final AccessibleRole ROOT_PANE ;
public static final AccessibleRole ROW_HEADER ;
public static final AccessibleRole SCROLL_BAR ;
public static final AccessibleRole SCROLL_PANE ;
public static final AccessibleRole SEPARATOR ;
public static final AccessibleRole SLIDER ;
public static final AccessibleRole SPLIT_PANE ;
public static final AccessibleRole SWING_COMPONENT ;
public static final AccessibleRole TABLE ;
public static final AccessibleRole TEXT ;
public static final AccessibleRole TOGGLE_BUTTON ;
public static final AccessibleRole TOOL_BAR ;
public static final AccessibleRole TOOL_TIP ;
public static final AccessibleRole TREE ;
public static final AccessibleRole UNKNOWN ;
public static final AccessibleRole VIEWPORT ;
public static final AccessibleRole WINDOW ;
}

Hierarchy: Object-->AccessibleBundle-->AccessibleRole

Returned By: Too many methods to list.

Type Of: Too many fields to list.

AccessibleSelectionJava 1.2
javax.accessibility

This interface allows an assistive technology to query and set the selection state of an accessible object that allows selection of items that are themselves accessible objects. An accessible object with selectable children should return an AccessibleSelection object from the getAccessibleSelection() method of its AccessibleContext. It should also be sure to implement Accessible objects to represent each of the selectable children. As an example, note that JTextComponent allows text to be selected, but this is not a selectable child, so it does not support the AccessibleSelection interface. On the other hand, JList allows selection of discrete child list items. It supports the AccessibleSelection interface and defines the JList.AccessibleJList.AccessibleJListChild to provide accessibility support for the individual items in the list. Applications never need to use or implement this interface.

public abstract interface AccessibleSelection {
// Public Instance Methods
public abstract void addAccessibleSelection (int i);
public abstract void clearAccessibleSelection ();
public abstract Accessible getAccessibleSelection (int i);
public abstract int getAccessibleSelectionCount ();
public abstract boolean isAccessibleChildSelected (int i);
public abstract void removeAccessibleSelection (int i);
public abstract void selectAllAccessibleSelection ();
}

Implementations: javax.swing.JList.AccessibleJList, javax.swing.JMenu.AccessibleJMenu, javax.swing.JMenuBar.AccessibleJMenuBar, javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTable.AccessibleJTable, javax.swing.JTree.AccessibleJTree, javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode

Returned By: AccessibleContext.getAccessibleSelection(), javax.swing.JList.AccessibleJList.getAccessibleSelection(), javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleSelection(), javax.swing.JMenu.AccessibleJMenu.getAccessibleSelection(), javax.swing.JMenuBar.AccessibleJMenuBar.getAccessibleSelection(), javax.swing.JTabbedPane.AccessibleJTabbedPane.getAccessibleSelection(), javax.swing.JTable.AccessibleJTable.getAccessibleSelection(), javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleSelection(), javax.swing.JTree.AccessibleJTree.getAccessibleSelection(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleSelection(), javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleSelection()

AccessibleStateJava 1.2
javax.accessibility

This class exists to provide a type-safe enumeration of constants that describe the various states that accessible components may exist in. AccessibleState objects are aggregated into AccessibleStateSet objects, which are returned by the getAccessibleStateSet() method of an AccessibleContext. Every accessible object that is capable of existing in more than one state should return an appropriate set of AccessibleState constants from its AccessibleContext object. AccessibleState inherits toDisplayString() from it superclass. This method returns a localized human-readable string describing the role. Applications never need to use this class.

public class AccessibleState extends AccessibleBundle {
// Protected Constructors
protected AccessibleState (String key);
// Public Constants
public static final AccessibleState ACTIVE ;
public static final AccessibleState ARMED ;
public static final AccessibleState BUSY ;
public static final AccessibleState CHECKED ;
public static final AccessibleState COLLAPSED ;
public static final AccessibleState EDITABLE ;
public static final AccessibleState ENABLED ;
public static final AccessibleState EXPANDABLE ;
public static final AccessibleState EXPANDED ;
public static final AccessibleState FOCUSABLE ;
public static final AccessibleState FOCUSED ;
public static final AccessibleState HORIZONTAL ;
public static final AccessibleState ICONIFIED ;
public static final AccessibleState MODAL ;
public static final AccessibleState MULTI_LINE ;
public static final AccessibleState MULTISELECTABLE ;
public static final AccessibleState OPAQUE ;
public static final AccessibleState PRESSED ;
public static final AccessibleState RESIZABLE ;
public static final AccessibleState SELECTABLE ;
public static final AccessibleState SELECTED ;
public static final AccessibleState SHOWING ;
public static final AccessibleState SINGLE_LINE ;
public static final AccessibleState TRANSIENT ;
public static final AccessibleState VERTICAL ;
public static final AccessibleState VISIBLE ;
}

Hierarchy: Object-->AccessibleBundle-->AccessibleState

Passed To: AccessibleStateSet.{AccessibleStateSet(), add(), addAll(), contains(), remove()}

Returned By: AccessibleStateSet.toArray()

Type Of: Too many fields to list.

AccessibleStateSetJava 1.2
javax.accessibility

This class maintains a list of AccessibleState objects. Every accessible object that can exist in more than one state should return an appropriate AccessibleStateSet describing its current state from the getAccessibleStateSet() method of its AccessibleContext. Applications never need to use this class.

public class AccessibleStateSet {
// Public Constructors
public AccessibleStateSet ();
public AccessibleStateSet (AccessibleState[ ] states);
// Public Instance Methods
public boolean add (AccessibleState state);
public void addAll (AccessibleState[ ] states);
public void clear ();
public boolean contains (AccessibleState state);
public boolean remove (AccessibleState state);
public AccessibleState[ ] toArray ();
// Public Methods Overriding Object
public String toString ();
// Protected Instance Fields
protected java.util.Vector states ;
}

Returned By: Too many methods to list.

AccessibleTextJava 1.2
javax.accessibility

This interface allows an assistive technology to query the textual contents, textual selection, and text-insertion positions of an accessible object that contains nonstatic text. An accessible object that contains nonstatic text should return an AccessibleText object from the getAccessibleText() method of its AccessibleContext. Note that components such as JButton and JLabel do not support this interface. They display only static text, and their contents are adequately described by the getAccessibleName() and getAccessibleDescription() methods of the AccessibleContext. Applications never need to use or implement this interface.

public abstract interface AccessibleText {
// Public Constants
public static final int CHARACTER ; =1
public static final int SENTENCE ; =3
public static final int WORD ; =2
// Property Accessor Methods (by property name)
public abstract int getCaretPosition ();
public abstract int getCharCount ();
public abstract String getSelectedText ();
public abstract int getSelectionEnd ();
public abstract int getSelectionStart ();
// Public Instance Methods
public abstract String getAfterIndex (int part, int index);
public abstract String getAtIndex (int part, int index);
public abstract String getBeforeIndex (int part, int index);
public abstract javax.swing.text.AttributeSet getCharacterAttribute (int i);
public abstract java.awt.Rectangle getCharacterBounds (int i);
public abstract int getIndexAtPoint (java.awt.Point p);
}

Implementations: AccessibleHypertext, javax.swing.text.JTextComponent.AccessibleJTextComponent

Returned By: AccessibleContext.getAccessibleText(), javax.swing.JEditorPane.AccessibleJEditorPaneHTML.getAccessibleText(), javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleText(), javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleText(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleText(), javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleText(), javax.swing.text.JTextComponent.AccessibleJTextComponent.getAccessibleText()

AccessibleValueJava 1.2
javax.accessibility

This interface allows an assistive technology to set and query the numerical value displayed or maintained by an accessible object, such as a JScrollBar. It also allows an assistive technology to query the legal range of values supported by the accessible object. An accessible object that maintains a numerical value should return an AccessibleValue object from the getAccessibleValue() method of its AccessibleContext. Applications never need to use or implement this interface.

public abstract interface AccessibleValue {
// Public Instance Methods
public abstract Number getCurrentAccessibleValue ();
public abstract Number getMaximumAccessibleValue ();
public abstract Number getMinimumAccessibleValue ();
public abstract boolean setCurrentAccessibleValue (Number n);
}

Implementations: javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon, javax.swing.JProgressBar.AccessibleJProgressBar, javax.swing.JScrollBar.AccessibleJScrollBar, javax.swing.JSlider.AccessibleJSlider, javax.swing.JSplitPane.AccessibleJSplitPane

Returned By: AccessibleContext.getAccessibleValue(), javax.swing.AbstractButton.AccessibleAbstractButton.getAccessibleValue(), javax.swing.JInternalFrame.AccessibleJInternalFrame.getAccessibleValue(), javax.swing.JInternalFrame.JDesktopIcon.AccessibleJDesktopIcon.getAccessibleValue(), javax.swing.JList.AccessibleJList.AccessibleJListChild.getAccessibleValue(), javax.swing.JProgressBar.AccessibleJProgressBar.getAccessibleValue(), javax.swing.JScrollBar.AccessibleJScrollBar.getAccessibleValue(), javax.swing.JSlider.AccessibleJSlider.getAccessibleValue(), javax.swing.JSplitPane.AccessibleJSplitPane.getAccessibleValue(), javax.swing.JTable.AccessibleJTable.AccessibleJTableCell.getAccessibleValue(), javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.getAccessibleValue(), javax.swing.table.JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry.getAccessibleValue()



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.