Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swt.accessibility
Interface AccessibleControlListener

All Superinterfaces:
  EventListener, org.eclipse.swt.internal.SWTEventListener

All Known Implementing Classes:
  AccessibleControlAdapter

public interface AccessibleControlListener
extends org.eclipse.swt.internal.SWTEventListener

Classes that implement this interface provide methods that deal with the events that are generated when an accessibility client sends a message to a control.

After creating an instance of a class that implements this interface it can be added to a control using the `addAccessibleControlListener` method and removed using the `removeAccessibleControlListener` method. When a client requests information the appropriate method will be invoked.

Note: Accessibility clients use child identifiers to specify whether they want information about a control or one of its children. Child identifiers are increasing integers beginning with 0. The identifier CHILDID_SELF represents the control itself.

Note: This interface is typically used by implementors of a custom control to provide very detailed information about the control instance to accessibility clients.

Since:
  2.0
See Also:
  `AccessibleControlAdapter`, `AccessibleControlEvent`

Method Summary
`void` | `getChild(AccessibleControlEvent e)` Sent when an accessibility client requests the accessible object for a child of the control.
`void` | `getChildAtPoint(AccessibleControlEvent e)` Sent when an accessibility client requests the identifier of the control child at the specified display coordinates.
`void` | `getChildCount(AccessibleControlEvent e)` Sent when an accessibility client requests the number of children in the control.
`void` | `getChildren(AccessibleControlEvent e)` Sent when an accessibility client requests the children of the control.
`void` | `getDefaultAction(AccessibleControlEvent e)` Sent when an accessibility client requests the default action of the control, or the default action of a child of the control.
`void` | `getFocus(AccessibleControlEvent e)` Sent when an accessibility client requests the identity of the child or control that has keyboard focus.
`void` | `getLocation(AccessibleControlEvent e)` Sent when an accessibility client requests the location of the control, or the location of a child of the control.
`void` | `getRole(AccessibleControlEvent e)` Sent when an accessibility client requests the role of the control, or the role of a child of the control.
`void` | `getSelection(AccessibleControlEvent e)` Sent when an accessibility client requests the identity of the child or control that is currently selected.
`void` | `getState(AccessibleControlEvent e)` Sent when an accessibility client requests the state of the control, or the state of a child of the control.
`void` | `getValue(AccessibleControlEvent e)` Sent when an accessibility client requests the value of the control, or the value of a child of the control.

Method Detail

### getChildAtPoint

    public void getChildAtPoint(AccessibleControlEvent e)

  Sent when an accessibility client requests the identifier of the control child at the specified display coordinates.

  Return the identifier of the child at display point (x, y) in the `childID` field of the event object. Return CHILDID_SELF if point (x, y) is in the control itself and not in any child. Return CHILDID_NONE if point (x, y) is not contained in either the control or any of its children.

  Parameters:
    `e` - an event object containing the following fields:
    - x, y [IN] - the specified point in display coordinates
    - childID [Typical OUT] - the ID of the child at point, or CHILDID_SELF, or CHILDID_NONE
    - accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID

### getLocation

    public void getLocation(AccessibleControlEvent e)

  Sent when an accessibility client requests the location of the control, or the location of a child of the control.

  Return a rectangle describing the location of the specified control or child in the `x, y, width, and height` fields of the event object.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying the control or one of its children
    - x, y, width, height [OUT] - the control or child location in display coordinates

### getChild

    public void getChild(AccessibleControlEvent e)

  Sent when an accessibility client requests the accessible object for a child of the control.

  Return an `Accessible` for the specified control or child in the `accessible` field of the event object. Return null if the specified child does not have its own `Accessible`.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying a child of the control
    - accessible [OUT] - an Accessible for the specified childID, or null if one does not exist

### getChildCount

    public void getChildCount(AccessibleControlEvent e)

  Sent when an accessibility client requests the number of children in the control.

  Return the number of child items in the `detail` field of the event object.

  Parameters:
    `e` - an event object containing the following fields:
    - detail [OUT] - the number of child items in this control

### getDefaultAction

    public void getDefaultAction(AccessibleControlEvent e)

  Sent when an accessibility client requests the default action of the control, or the default action of a child of the control.

  This string is typically a verb describing what the user does to it. For example, a Push Button's default action is "Press", a Check Button's is "Check" or "UnCheck", and List items have the default action "Double Click".

  Return a string describing the default action of the specified control or child in the `result` field of the event object. Returning null tells the client to use the platform default action string.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying the control or one of its children
    - result [OUT] - the requested default action string, or null

### getFocus

    public void getFocus(AccessibleControlEvent e)

  Sent when an accessibility client requests the identity of the child or control that has keyboard focus.

  Return the identifier of the child that has focus in the `childID` field of the event object. Return CHILDID_SELF if the control itself has keyboard focus. Return CHILDID_NONE if neither the control nor any of its children has focus.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [Typical OUT] - the ID of the child with focus, or CHILDID_SELF, or CHILDID_NONE
    - accessible [Optional OUT] - the accessible object for a child may be returned instead of its childID

### getRole

    public void getRole(AccessibleControlEvent e)

  Sent when an accessibility client requests the role of the control, or the role of a child of the control.

  Return a role constant (constant defined in ACC beginning with ROLE_) that describes the role of the specified control or child in the `detail` field of the event object.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying the control or one of its children
    - detail [OUT] - a role constant describing the role of the control or child

### getSelection

    public void getSelection(AccessibleControlEvent e)

  Sent when an accessibility client requests the identity of the child or control that is currently selected.

  Return the identifier of the selected child in the `childID` field of the event object. Return CHILDID_SELF if the control itself is selected. Return CHILDID_MULTIPLE if multiple children are selected, and return an array of childIDs in the `children` field. Return CHILDID_NONE if neither the control nor any of its children are selected.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [Typical OUT] - the ID of the selected child, or CHILDID_SELF, or CHILDID_MULTIPLE, or CHILDID_NONE
    - accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID

### getState

    public void getState(AccessibleControlEvent e)

  Sent when an accessibility client requests the state of the control, or the state of a child of the control.

  Return a state constant (constant defined in ACC beginning with STATE_) that describes the current state of the specified control or child in the `detail` field of the event object.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying the control or one of its children
    - detail [OUT] - a state constant describing the current state of the control or child

### getValue

    public void getValue(AccessibleControlEvent e)

  Sent when an accessibility client requests the value of the control, or the value of a child of the control.

  Many controls do not return a value. Examples of controls that do are: Combo returns the text string, Text returns its contents, ProgressBar returns a string representing a percentage, and Tree items return a string representing their level in the tree.

  Return a string describing the value of the specified control or child in the `result` field of the event object. Returning null tells the client to use the platform value string.

  Parameters:
    `e` - an event object containing the following fields:
    - childID [IN] - an identifier specifying the control or one of its children
    - result [OUT] - the requested value string, or null

### getChildren

    public void getChildren(AccessibleControlEvent e)

  Sent when an accessibility client requests the children of the control.

  Return the children as an array of childIDs in the `children` field of the event object.

  Parameters:
    `e` - an event object containing the following fields:
    - children [Typical OUT] - an array of childIDs
    - children [Optional OUT] - an array of accessible objects for the children may be returned instead of the childIDs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.