Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.accessibility

Class AccessibleContext

java.lang.Object
|
+--javax.accessibility.AccessibleContext


public abstract class AccessibleContext

extends Object

The minimum information that all accessible objects return. This includes name, description, role, and state of the object, parents and children, and any other useful information. If a component supports further details, it should implement one of the following:

Since:Author:

Field Summary

static java.lang.StringACCESSIBLE_ACTION_PROPERTY

Constant used when supported set of actions has changed.
static java.lang.StringACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY

Constant used when active descendent of a component has changed.
static java.lang.StringACCESSIBLE_CARET_PROPERTY

Constant used when the accessibleText caret has changed.
static java.lang.StringACCESSIBLE_CHILD_PROPERTY

Constant used when children are added or removed.
static java.lang.StringACCESSIBLE_DESCRIPTION_PROPERTY

Constanat used when the accessible description has changed.
static java.lang.StringACCESSIBLE_HYPERTEXT_OFFSET

Constant used when a hypertext element received focus.
static java.lang.StringACCESSIBLE_NAME_PROPERTY

Constant used when the accessible name has changed.
static java.lang.StringACCESSIBLE_SELECTION_PROPERTY

Constant used when the accessibleSelection has changed.
static java.lang.StringACCESSIBLE_STATE_PROPERTY

Constant used when the accessibleStateSet has changed.
static java.lang.StringACCESSIBLE_TABLE_CAPTION_CHANGED

Constant used when the accessible table caption has changed.
static java.lang.StringACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED

Constant used when the accessible table column description has changed.
static java.lang.StringACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED

Constant used when the accessible table column header has changed.
static java.lang.StringACCESSIBLE_TABLE_MODEL_CHANGED

Constant used when the accessible table model has changed.
static java.lang.StringACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED

Constant used when the accessible table row description has changed.
static java.lang.StringACCESSIBLE_TABLE_ROW_HEADER_CHANGED

Constant used when the accessible table row header has changed.
static java.lang.StringACCESSIBLE_TABLE_SUMMARY_CHANGED

Constant used when the accessible table summary has changed.
static java.lang.StringACCESSIBLE_TEXT_PROPERTY

Constant used when the accessibleText has changed.
static java.lang.StringACCESSIBLE_VALUE_PROPERTY

Constant used when the accessibleValue has changed.
static java.lang.StringACCESSIBLE_VISIBLE_DATA_PROPERTY

Constant used when the visible data has changed.
java.lang.StringaccessibleDescription

A localized string describing this object.
java.lang.StringaccessibleName

A localized string naming this object.
javax.accessibility.AccessibleaccessibleParent

The accessible parent of this object.

Constructor Summary

AccessibleContext()

Default constructor.

Method Summary

voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)

Add a PropertyChangeListener to the listener list.
voidfirePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)

Fire an event to report property changes.
javax.accessibility.AccessibleActiongetAccessibleAction()

Get any supported accessible actions.
javax.accessibility.AccessiblegetAccessibleChild(int i)

Returns the specified accessible chile.
intgetAccessibleChildrenCount()

Returns the number of accessible children of this object.
javax.accessibility.AccessibleComponentgetAccessibleComponent()

Get any supported accessible compoent.
java.lang.StringgetAccessibleDescription()

Get the localized description of the object.
javax.accessibility.AccessibleEditableTextgetAccessibleEditableText()

Get any supported accessible editable text.
javax.accessibility.AccessibleIcon[]getAccessibleIcon()

Get all supported accessible icons.
intgetAccessibleIndexInParent()

Gets the index of this object within its accessible parent.
java.lang.StringgetAccessibleName()

Get the localized name of the object.
javax.accessibility.AccessiblegetAccessibleParent()

Return the accessible parent of this object.
javax.accessibility.AccessibleRelationSetgetAccessibleRelationSet()

Get any supported accessible relation set.
javax.accessibility.AccessibleRolegetAccessibleRole()

Gets the role of this object.
javax.accessibility.AccessibleSelectiongetAccessibleSelection()

Get any supported accessible selection.
javax.accessibility.AccessibleStateSetgetAccessibleStateSet()

Gets the state set of this object.
javax.accessibility.AccessibleTablegetAccessibleTable()

Get any supported accessible table.
javax.accessibility.AccessibleTextgetAccessibleText()

Get any supported accessible text.
javax.accessibility.AccessibleValuegetAccessibleValue()

Get any supported accessible value.
java.util.LocalegetLocale()

Gets the component locale, deferring to the parent if one is not declared.
voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)

Remove a PropertyChangeListener from the listener list.
voidsetAccessibleDescription(java.lang.String s)

Set the localized name of the object.
voidsetAccessibleName(java.lang.String s)

Set the localized name of the object.
voidsetAccessibleParent(javax.accessibility.Accessible a)

Sets the accessible parent of this object.

Field Details

ACCESSIBLE_ACTION_PROPERTY

public static final String ACCESSIBLE_ACTION_PROPERTY

Constant used when supported set of actions has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY

public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY

Constant used when active descendent of a component has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_CARET_PROPERTY

public static final String ACCESSIBLE_CARET_PROPERTY

Constant used when the accessibleText caret has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_CHILD_PROPERTY

public static final String ACCESSIBLE_CHILD_PROPERTY

Constant used when children are added or removed. On addition, the new value of the event holds the new child; on removal, the old value holds the removed child.

See Also:


ACCESSIBLE_DESCRIPTION_PROPERTY

public static final String ACCESSIBLE_DESCRIPTION_PROPERTY

Constanat used when the accessible description has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_HYPERTEXT_OFFSET

public static final String ACCESSIBLE_HYPERTEXT_OFFSET

Constant used when a hypertext element received focus. Both the old and new values are listed in the event, with -1 indicating that no link had focus.

See Also:


ACCESSIBLE_NAME_PROPERTY

public static final String ACCESSIBLE_NAME_PROPERTY

Constant used when the accessible name has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_SELECTION_PROPERTY

public static final String ACCESSIBLE_SELECTION_PROPERTY

Constant used when the accessibleSelection has changed. Both the old and new values of the event are reserved for future use.

See Also:


ACCESSIBLE_STATE_PROPERTY

public static final String ACCESSIBLE_STATE_PROPERTY

Constant used when the accessibleStateSet has changed. Both the old and new values are listed in the event, although either may be null if a state was disabled at that time.

See Also:


ACCESSIBLE_TABLE_CAPTION_CHANGED

public static final String ACCESSIBLE_TABLE_CAPTION_CHANGED

Constant used when the accessible table caption has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED

public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED

Constant used when the accessible table column description has changed. Only the new value of the event has meaning.

See Also:


ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED

public static final String ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED

Constant used when the accessible table column header has changed. Only the new value of the event has meaning.

See Also:


ACCESSIBLE_TABLE_MODEL_CHANGED

public static final String ACCESSIBLE_TABLE_MODEL_CHANGED

Constant used when the accessible table model has changed. Only the new value of the event has meaning.

See Also:


ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED

public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED

Constant used when the accessible table row description has changed. Only the new value of the event has meaning.

See Also:


ACCESSIBLE_TABLE_ROW_HEADER_CHANGED

public static final String ACCESSIBLE_TABLE_ROW_HEADER_CHANGED

Constant used when the accessible table row header has changed. Only the new value of the event has meaning.

See Also:


ACCESSIBLE_TABLE_SUMMARY_CHANGED

public static final String ACCESSIBLE_TABLE_SUMMARY_CHANGED

Constant used when the accessible table summary has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_TEXT_PROPERTY

public static final String ACCESSIBLE_TEXT_PROPERTY

Constant used when the accessibleText has changed. Both the old and new values of the event are reserved for future use.

See Also:


ACCESSIBLE_VALUE_PROPERTY

public static final String ACCESSIBLE_VALUE_PROPERTY

Constant used when the accessibleValue has changed. Both the old and new values are listed in the event.

See Also:


ACCESSIBLE_VISIBLE_DATA_PROPERTY

public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY

Constant used when the visible data has changed. Both the old and new values of the event are reserved for future use.

See Also:


accessibleDescription

protected String accessibleDescription

A localized string describing this object.

See Also:


accessibleName

protected String accessibleName

A localized string naming this object.

See Also:


accessibleParent

protected Accessible accessibleParent

The accessible parent of this object.

See Also:


Constructor Details

AccessibleContext

public AccessibleContext()

Default constructor.


Method Details

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

Add a PropertyChangeListener to the listener list. This listener will be notified of all property changes to the accessible object.

Parameters:

See Also:


firePropertyChange

public void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)

Fire an event to report property changes. This is intended for use by the accessible objects, not general application programs. If oldValue and newValue differ, and the listenter list is not empty, a PropertyChange event is fired to each listener.

Parameters:

See Also:


getAccessibleAction

public AccessibleAction getAccessibleAction()

Get any supported accessible actions. The default implementation returns null.

Returns:

See Also:


getAccessibleChild

public Accessible getAccessibleChild(int i)

Returns the specified accessible chile.

Parameters:

Returns:

See Also:


getAccessibleChildrenCount

public int getAccessibleChildrenCount()

Returns the number of accessible children of this object.

Returns:

See Also:


getAccessibleComponent

public AccessibleComponent getAccessibleComponent()

Get any supported accessible compoent. The default implementation returns null.

Returns:

See Also:


getAccessibleDescription

public String getAccessibleDescription()

Get the localized description of the object. For example, a 'Cancel' button may be described as "Ignore changes and close dialog box" in en_US.

Returns:

See Also:


getAccessibleEditableText

public AccessibleEditableText getAccessibleEditableText()

Get any supported accessible editable text. The default implementation returns null.

Returns:

See Also:


getAccessibleIcon

public AccessibleIcon[] getAccessibleIcon()

Get all supported accessible icons. The default implementation returns null.

Returns:

See Also:


getAccessibleIndexInParent

public int getAccessibleIndexInParent()

Gets the index of this object within its accessible parent.

Returns:

See Also:


getAccessibleName

public String getAccessibleName()

Get the localized name of the object. For example, a label may just return the text of the label, while an entry field for city may return "city" in en_US.

Returns:

See Also:


getAccessibleParent

public Accessible getAccessibleParent()

Return the accessible parent of this object.

Returns:


getAccessibleRelationSet

public AccessibleRelationSet getAccessibleRelationSet()

Get any supported accessible relation set. The default implementation returns null.

Returns:

See Also:


getAccessibleRole

public AccessibleRole getAccessibleRole()

Gets the role of this object. For example, a button serves the role of AccessibleRole.PUSH_BUTTON. This allows assistive technologies to funnel similar objects into the same assistance classes. Note that the class is extensible, to define new roles if necessary.

Returns:

See Also:


getAccessibleSelection

public AccessibleSelection getAccessibleSelection()

Get any supported accessible selection. The default implementation returns null.

Returns:

See Also:


getAccessibleStateSet

public AccessibleStateSet getAccessibleStateSet()

Gets the state set of this object. A change in the state of the object will fire a PropertyChangeEvent for ACCESSIBLE_STATE_PROPERTY.

Returns:

See Also:


getAccessibleTable

public AccessibleTable getAccessibleTable()

Get any supported accessible table. The default implementation returns null.

Returns:

See Also:


getAccessibleText

public AccessibleText getAccessibleText()

Get any supported accessible text. The default implementation returns null.

Returns:

See Also:


getAccessibleValue

public AccessibleValue getAccessibleValue()

Get any supported accessible value. The default implementation returns null.

Returns:

See Also:


getLocale

public Locale getLocale()

Gets the component locale, deferring to the parent if one is not declared.

Returns:

Throws:


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

Remove a PropertyChangeListener from the listener list.

Parameters:

See Also:


setAccessibleDescription

public void setAccessibleDescription(java.lang.String s)

Set the localized name of the object. This will fire a PropertyChangeEvent with ACCESSIBLE_DESCRIPTION_PROPERTY.

Parameters:

See Also:


setAccessibleName

public void setAccessibleName(java.lang.String s)

Set the localized name of the object. This will fire a PropertyChangeEvent with ACCESSIBLE_NAME_PROPERTY.

Parameters:

See Also:


setAccessibleParent

public void setAccessibleParent(javax.accessibility.Accessible a)

Sets the accessible parent of this object. This should only be used when the current parent object should not be the accessible parent; only the parent of the accessible child should call this method.

Parameters: