|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AccessibleContext
AccessibleContext represents the minimum information all accessible objects provide. This information includes the accessible name, role, and state of the object, as well as information about its parent and children. AccessibleContext also contains methods for obtaining more specific accessibility information about a component. If the component supports them, these methods will return an object that implements one or more of the following interfaces:
AccessibleText
- the object presents editable textual
information on the display. This interface provides the standard mechanism
for an assistive technology to access that text via its content, attributes,
and spatial location. Any object that contains editable text should support
this interface.
AccessibleTable
- the object presents tabular information on the
display. This interface provides the standard mechanism for an assistive
technology to access table columns and rows and current selection. Any object
that represents a table should support this interface.
AccessibleValue
- the object supports a numerical value. This
interface provides the standard mechanism for an assistive technology to
determine and set the current value of the object, as well as obtain its
minimum and maximum values. Any object that supports a numerical value should
support this interface.
Field Summary | ||
---|---|---|
static int |
ACCESSIBLE_CARET_CHANGED
Specifies caret movement event. |
|
static int |
ACCESSIBLE_CHILD_CHANGED
Specifies child change event. |
|
static int |
ACCESSIBLE_NAME_CHANGED
Specifies element name change. |
|
static int |
ACCESSIBLE_SELECTION_CHANGED
Specifies selection change event. |
|
static int |
ACCESSIBLE_STATE_CHANGED
Specifies accessible state transition event type. |
|
static int |
ACCESSIBLE_TEXT_CHANGED
Specifies text change event. |
|
static int |
ACCESSIBLE_VALUE_CHANGED
Specifies numerical or sequential value change. |
Method Summary | ||
---|---|---|
AccessibleContext |
getAccessibleChildAt(int index)
Returns the specified Accessible child of the object. |
|
int |
getAccessibleChildCount()
Return number of children for conatiners. |
|
String |
getAccessibleName()
Returns accessible name of the element. |
|
AccessibleContext |
getAccessibleParent()
Returns the parent context of this, typically the containing Manager or Screen. |
|
int |
getAccessibleRole()
Returns accessible role of the element. |
|
AccessibleContext |
getAccessibleSelectionAt(int index)
Returns the context of a selected item indicated by index out of the collection of selected items. |
|
int |
getAccessibleSelectionCount()
Returns the number of items currently selected. |
|
int |
getAccessibleStateSet()
Returns current set of states. |
|
AccessibleTable |
getAccessibleTable()
Returns the AccessibleTable associated with an object. |
|
AccessibleText |
getAccessibleText()
Returns accessible text for textual fields. |
|
AccessibleValue |
getAccessibleValue()
Returns accessible value for numerical fields. |
|
boolean |
isAccessibleChildSelected(int index)
Determines if the current child of this object is selected. |
|
boolean |
isAccessibleStateSet(int state)
Determines whether or not state is set on this accessible element. |
Field Detail |
---|
static final int ACCESSIBLE_STATE_CHANGED
static final int ACCESSIBLE_TEXT_CHANGED
static final int ACCESSIBLE_CARET_CHANGED
static final int ACCESSIBLE_CHILD_CHANGED
The two notification parameters in the
AccessibleEventListener.accessibleEventOccurred(int, Object, Object, AccessibleContext)
method may optionally provide information about which container elements
have been removed and added. This may help assistive technology to read
only the affected elements if container has many of them. Both parameters
are optional, however, if any of them is provided then the set must be
complete meaning no other components were added or removed from the
container. For example, if a screen changes dramatically affecting many
fields then it is better to pass NULL parameter values indicating that
screen reader should re-read the whole screen. On the other hand if
relatively small number of fields were added or removed from the screen
with big number of fields then it is advised to provide only the set of
changed fields. In order to pass affected elements the two method
parameter should be an array with the following type:
AccessibleContext
[]. The oldValue (2nd method parameter)
contains container elements that existed before the notification and were
removed. Similarly, the newValue (3rd method parameter) contains new
elements that were added.
static final int ACCESSIBLE_SELECTION_CHANGED
static final int ACCESSIBLE_VALUE_CHANGED
AccessibleContext.getAccessibleValue()
method.
static final int ACCESSIBLE_NAME_CHANGED
Method Detail |
---|
AccessibleContext getAccessibleChildAt(int index)
index
- Index of child requested.
int getAccessibleChildCount()
String getAccessibleName()
AccessibleContext getAccessibleParent()
For Screens/Dialogs this returns null.
For Fields - this returns the Screen (e.g. Dialog) containing the Field.
For complex Field elements (e.g. menu items, etc) - this returns the Field (e.g. menu.
int getAccessibleRole()
AccessibleRole
AccessibleContext getAccessibleSelectionAt(int index)
index
out of the collection of selected items.
For cases where there is only 1 item selected at a time only the index of 0 is valid.
For classes that allow multi-selection the index is the position in the list of selected items where 0 indicates the start of the selection.
index
- Index of selelected item, does not correspond to the child index.
int getAccessibleSelectionCount()
int getAccessibleStateSet()
AccessibleState
AccessibleTable getAccessibleTable()
AccessibleText getAccessibleText()
AccessibleValue getAccessibleValue()
This method should is supported by components that represent ranged set of numerical values, such as GaugeField. Those fields that have ranged non-numerical values won't utilize this method, such as DateField.
boolean isAccessibleChildSelected(int index)
index
- Index of child.
boolean isAccessibleStateSet(int state)
state
is set on this accessible element.
The method parameter should be one of the states flags constants from the
AccessibleState
class. If the state method parameter contains
more than one states flag then the returning value will be true if
any of the given states is possessed by the component, false if component
doesn't have any of the given states.
state
- Determine if this state flag belongs to the set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.