public abstract class AccessibleControlAdapter extends java.lang.Object implements AccessibleControlListener
AccessibleControlListener
interface.
Classes that wish to deal with AccessibleControlEvent
s 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.
AccessibleControlListener
,
AccessibleControlEvent
,
Sample code and further informationConstructor and Description |
---|
AccessibleControlAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
getChild(AccessibleControlEvent e)
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.
|
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, or visible 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.
|
public void getChildAtPoint(AccessibleControlEvent e)
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.
getChildAtPoint
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getLocation(AccessibleControlEvent e)
Return a rectangle describing the location of the specified
control or child in the x, y, width, and height
fields of the event object.
getLocation
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getChild(AccessibleControlEvent e)
The childID field in the event object can be one of the following:
ACC.CHILDID_CHILD_AT_INDEX
- return the accessible child object at the specified index,
or null if this object has no childrenACC.CHILDID_CHILD_INDEX
- return the index of this accessible in its parentgetChild
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getChildCount(AccessibleControlEvent e)
Return the number of child items in the detail
field of the event object.
getChildCount
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getDefaultAction(AccessibleControlEvent e)
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.
getDefaultAction
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getFocus(AccessibleControlEvent e)
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.
getFocus
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getRole(AccessibleControlEvent e)
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.
getRole
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getSelection(AccessibleControlEvent e)
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.
getSelection
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getState(AccessibleControlEvent e)
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.
getState
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getValue(AccessibleControlEvent e)
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.
getValue
in interface AccessibleControlListener
e
- an event object containing the following fields:public void getChildren(AccessibleControlEvent e)
Return the children as an array of childIDs or accessibles in the
children
field of the event object.
getChildren
in interface AccessibleControlListener
e
- an event object containing the following fields:
Copyright (c) EclipseSource and others 2002, 2017.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0