org.eclipse.actf.accservice.core
Interface IAccessibleElement

All Known Subinterfaces:
IAccessibleElement2
All Known Implementing Classes:
IA2Accessible, JavaAccessible, MsaaAccessible

public interface IAccessibleElement

interface for exposing accessibility-related properties to the validation engine. Because ACTF is an accessibility validation environment, each element of a hierarchical structure (especially of a GUI hierarchy) will most often be exposed as either that element itself or as an accessible object. This 'accessible object' is usually different from the original element and exposes properties of the original element that aid asisstive technologies in rendering the element in an alternative manner.

This interface provides a way for elements to be viewed as accessible objects by exposing the most commonly queried properties. It permits different structures to present properties to the ACTF engine in a consistent manner.

In most cases, implementations of this interface will be primarily native and platform-dependent.

Author:
Mike Squillace

Method Summary
 void checkIsValid()
          checks whether or not this accessible element is in a valid state.
 Object element()
          get the element associated with this accessible element
 Object getAccessibleAction()
          return the default action
 int getAccessibleChildCount()
          return the number of children of this element.
 IAccessibleElement[] getAccessibleChildren()
          return all of the children of this accessible element.
 String getAccessibleDescription()
          return description or use of control
 int getAccessibleIndexInParent()
          retreave the index of this accessible within its parent accessible
 String getAccessibleKeyboardShortcut()
          return the keyboard shortcut or mnemonic
 Rectangle getAccessibleLocation()
          Gets the bounds of this object in the form of a Rectangle object.
 String getAccessibleName()
          return the name or short description of this element
 IAccessibleElement getAccessibleParent()
          returns the parent accessible object.
 String getAccessibleRole()
          return role or function of control.
 IAccessibleElement[] getAccessibleSelection()
          get the list of selected accessibles.
 Set getAccessibleState()
          return the state of the control.
 Object getAccessibleValue()
          return the value (e.g. of a scroll bar or combo)
 

Method Detail

element

Object element()
get the element associated with this accessible element

Returns:
original element associated with this accessible or null if this object was not initialized in such a way that the original element is available

checkIsValid

void checkIsValid()
                  throws InvalidComponentException
checks whether or not this accessible element is in a valid state. Validity may consist of whether or not the original element has been disposed or destroyed, whether or not this accessible was successfully initialized, and so forth.

Accessing properties of invalid accessible elements will raise an InvalidComponentException.

Throws:
InvalidComponentException

getAccessibleParent

IAccessibleElement getAccessibleParent()
                                       throws InvalidComponentException
returns the parent accessible object.

Returns:
parent accessible element or null if no parent for this element exists
Throws:
InvalidComponentException

getAccessibleIndexInParent

int getAccessibleIndexInParent()
                               throws InvalidComponentException
retreave the index of this accessible within its parent accessible

Returns:
index of this accessible in its parent or -1 if not available
Throws:
InvalidComponentException

getAccessibleChildCount

int getAccessibleChildCount()
                            throws InvalidComponentException
return the number of children of this element.

Returns:
number of children of this element
Throws:
InvalidComponentException

getAccessibleChildren

IAccessibleElement[] getAccessibleChildren()
                                           throws InvalidComponentException
return all of the children of this accessible element.

Returns:
all children of this element
Throws:
InvalidComponentException

getAccessibleName

String getAccessibleName()
                         throws InvalidComponentException
return the name or short description of this element

Returns:
name or an empty string if no name is provided
Throws:
InvalidComponentException

getAccessibleValue

Object getAccessibleValue()
                          throws InvalidComponentException
return the value (e.g. of a scroll bar or combo)

Returns:
value or an empty string if no value is provided
Throws:
InvalidComponentException

getAccessibleKeyboardShortcut

String getAccessibleKeyboardShortcut()
                                     throws InvalidComponentException
return the keyboard shortcut or mnemonic

Returns:
keyboard shortcut or an empty string if no shortcut is provided
Throws:
InvalidComponentException

getAccessibleAction

Object getAccessibleAction()
                           throws InvalidComponentException
return the default action

Returns:
default action or null if no default action is provided
Throws:
InvalidComponentException

getAccessibleDescription

String getAccessibleDescription()
                                throws InvalidComponentException
return description or use of control

Returns:
description of control or an empty string if no description is provided
Throws:
InvalidComponentException

getAccessibleRole

String getAccessibleRole()
                         throws InvalidComponentException
return role or function of control.

Note: All attempts will be made to return one of the pre-defined role constants in AccessibleConstants. Should the role be unknown or not match one of the pre-defined constants, the original role string from the underlying accessibility model will be returned.

Returns:
role of control or an empty string if no role is provided
Throws:
InvalidComponentException
See Also:
AccessibleConstants

getAccessibleState

Set getAccessibleState()
                       throws InvalidComponentException
return the state of the control. Note that the returned string may contain several states separated by commas.

Note: All attempts will be made to return one of the pre-defined state constants in AccessibleConstants. Should the state be unknown or not match one of the pre-defined constants, the original state from the underlying accessibility model will be returned.

Returns:
state of control or an empty set if no state is provided
Throws:
InvalidComponentException
See Also:
AccessibleConstants

getAccessibleSelection

IAccessibleElement[] getAccessibleSelection()
                                            throws InvalidComponentException
get the list of selected accessibles.

Returns:
selections or empty array if no selection
Throws:
InvalidComponentException

getAccessibleLocation

Rectangle getAccessibleLocation()
                                throws InvalidComponentException
Gets the bounds of this object in the form of a Rectangle object. The bounds specify this object's width, height, and location relative to its parent.

Returns:
A rectangle indicating this component's bounds; null if this object is not on the screen.
Throws:
InvalidComponentException