Top Description Constructors Methods
org.eclipse.swt.accessibility

public abstract Class AccessibleControlAdapter

extends Object
implements AccessibleControlListener
Class Inheritance
All Implemented Interfaces
org.eclipse.swt.accessibility.AccessibleControlListener, org.eclipse.swt.internal.SWTEventListener, java.util.EventListener

This adapter class provides default implementations for the methods described by the AccessibleControlListener interface.

Classes that wish to deal with AccessibleControlEvents can extend this class and override only the methods that they are interested in.

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. When returning a child identifier to a client, you may use CHILDID_NONE to indicate that no child or control has the required information.

Note

This adapter 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
AccessibleControlListener, AccessibleControlEvent, Sample code and further information

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
getChild(AccessibleControlEvent
an event object containing the following fields:
  • childID [IN] - an identifier specifying a child of the control, or one of the predefined CHILDID constants
  • detail [Optional IN] - the index of the child accessible to be returned when childID = CHILDID_CHILD_AT_INDEX
  • detail [Optional OUT] - the index of this accessible in its parent when childID = CHILDID_CHILD_INDEX
  • accessible [Optional OUT] - an Accessible for the specified childID or index, or null if one does not exist
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChild.

Sent when an accessibility client requests the accessible object for a child of the control by index or childID, or when a client requests the index of an accessible object in its parent.
public void
getChildAtPoint(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildAtPoint.

Sent when an accessibility client requests the identifier of the control child at the specified display coordinates.
public void
getChildCount(AccessibleControlEvent
an event object containing the following fields:
  • detail [OUT] - the number of child items in this control
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildCount.

Sent when an accessibility client requests the number of children in the control.
public void
getChildren(AccessibleControlEvent
an event object containing the following fields:
  • detail [IN] - a flag that may have one of the following values:
    • 0 (default) - return all children
    • VISIBLE - return all visible children
  • 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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildren.

Sent when an accessibility client requests the children, or visible children, of the control.
public void
getDefaultAction(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getDefaultAction.

Sent when an accessibility client requests the default action of the control, or the default action of a child of the control.
public void
getFocus(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getFocus.

Sent when an accessibility client requests the identity of the child or control that has keyboard focus.
public void
getLocation(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getLocation.

Sent when an accessibility client requests the location of the control, or the location of a child of the control.
public void
getRole(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getRole.

Sent when an accessibility client requests the role of the control, or the role of a child of the control.
public void
getSelection(AccessibleControlEvent
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
  • children [Optional OUT] - the array of childIDs for the selected children if CHILDID_MULTIPLE is returned
  • accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getSelection.

Sent when an accessibility client requests the identity of the child or control that is currently selected.
public void
getState(AccessibleControlEvent
an event object containing the following fields:
  • childID [IN] - an identifier specifying the control or one of its children
  • detail [OUT] - a state mask describing the current state of the control or child
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getState.

Sent when an accessibility client requests the state of the control, or the state of a child of the control.
public void
getValue(AccessibleControlEvent
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
e
)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getValue.

Sent when an accessibility client requests the value of the control, or the value of a child of the control.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AccessibleControlAdapterback to summary
public AccessibleControlAdapter()

Method Detail

getChildback to summary
public void getChild(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChild.

Sent when an accessibility client requests the accessible object for a child of the control by index or childID, or when a client requests the index of an accessible object in its parent.

The childID field in the event object can be one of the following:

  • an integer child ID - return the accessible object for the specified child ID, or null if the specified child does not have its own accessible
  • ACC#CHILDID_CHILD_AT_INDEX - return the accessible child object at the specified index, or null if this object has no children
  • ACC#CHILDID_CHILD_INDEX - return the index of this accessible in its parent
Parameters
e:AccessibleControlEvent

an event object containing the following fields:

  • childID [IN] - an identifier specifying a child of the control, or one of the predefined CHILDID constants
  • detail [Optional IN] - the index of the child accessible to be returned when childID = CHILDID_CHILD_AT_INDEX
  • detail [Optional OUT] - the index of this accessible in its parent when childID = CHILDID_CHILD_INDEX
  • accessible [Optional OUT] - an Accessible for the specified childID or index, or null if one does not exist
Annotations
@Override
getChildAtPointback to summary
public void getChildAtPoint(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildAtPoint.

Sent when an accessibility client requests the identifier of the control child at the specified display coordinates. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override
getChildCountback to summary
public void getChildCount(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildCount.

Sent when an accessibility client requests the number of children in the control. The default behavior is to do nothing.

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

Parameters
e:AccessibleControlEvent

an event object containing the following fields:

  • detail [OUT] - the number of child items in this control
Annotations
@Override
getChildrenback to summary
public void getChildren(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getChildren.

Sent when an accessibility client requests the children, or visible children, of the control. The default behavior is to do nothing.

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

Parameters
e:AccessibleControlEvent

an event object containing the following fields:

  • detail [IN] - a flag that may have one of the following values:
    • 0 (default) - return all children
    • VISIBLE - return all visible children
  • 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
Annotations
@Override
getDefaultActionback to summary
public void getDefaultAction(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getDefaultAction.

Sent when an accessibility client requests the default action of the control, or the default action of a child of the control. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override
getFocusback to summary
public void getFocus(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getFocus.

Sent when an accessibility client requests the identity of the child or control that has keyboard focus. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override
getLocationback to summary
public void getLocation(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getLocation.

Sent when an accessibility client requests the location of the control, or the location of a child of the control. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override
getRoleback to summary
public void getRole(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getRole.

Sent when an accessibility client requests the role of the control, or the role of a child of the control. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override
getSelectionback to summary
public void getSelection(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getSelection.

Sent when an accessibility client requests the identity of the child or control that is currently selected. The default behavior is to do nothing.

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:AccessibleControlEvent

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
  • children [Optional OUT] - the array of childIDs for the selected children if CHILDID_MULTIPLE is returned
  • accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID
Annotations
@Override
getStateback to summary
public void getState(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getState.

Sent when an accessibility client requests the state of the control, or the state of a child of the control. The default behavior is to do nothing.

Return a state mask (mask bit constants 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:AccessibleControlEvent

an event object containing the following fields:

  • childID [IN] - an identifier specifying the control or one of its children
  • detail [OUT] - a state mask describing the current state of the control or child
Annotations
@Override
getValueback to summary
public void getValue(AccessibleControlEvent e)

Implements org.eclipse.swt.accessibility.AccessibleControlListener.getValue.

Sent when an accessibility client requests the value of the control, or the value of a child of the control. The default behavior is to do nothing.

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:AccessibleControlEvent

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
Annotations
@Override