KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > accessibility > AccessibleAdapter


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.swt.accessibility;
12
13
14 /**
15  * This adapter class provides default implementations for the
16  * methods described by the <code>AccessibleListener</code> interface.
17  * <p>
18  * Classes that wish to deal with <code>AccessibleEvent</code>s can
19  * extend this class and override only the methods that they are
20  * interested in.
21  * </p><p>
22  * Note: Accessibility clients use child identifiers to specify
23  * whether they want information about a control or one of its children.
24  * Child identifiers are increasing integers beginning with 0.
25  * The identifier CHILDID_SELF represents the control itself.
26  * </p>
27  *
28  * @see AccessibleListener
29  * @see AccessibleEvent
30  *
31  * @since 2.0
32  */

33 public abstract class AccessibleAdapter implements AccessibleListener {
34
35     /**
36      * Sent when an accessibility client requests the name
37      * of the control, or the name of a child of the control.
38      * The default behavior is to do nothing.
39      * <p>
40      * Return the name of the control or specified child in the
41      * <code>result</code> field of the event object. Returning
42      * an empty string tells the client that the control or child
43      * does not have a name, and returning null tells the client
44      * to use the platform name.
45      * </p>
46      *
47      * @param e an event object containing the following fields:<ul>
48      * <li>childID [IN] - an identifier specifying the control or one of its children</li>
49      * <li>result [OUT] - the requested name string, or null</li>
50      * </ul>
51      */

52     public void getName(AccessibleEvent e) {
53     }
54         
55     /**
56      * Sent when an accessibility client requests the help string
57      * of the control, or the help string of a child of the control.
58      * The default behavior is to do nothing.
59      * <p>
60      * The information in this property should be similar to the help
61      * provided by toolTipText. It describes what the control or child
62      * does or how to use it, as opposed to getDescription, which
63      * describes appearance.
64      * </p><p>
65      * Return the help string of the control or specified child in
66      * the <code>result</code> field of the event object. Returning
67      * an empty string tells the client that the control or child
68      * does not have a help string, and returning null tells the
69      * client to use the platform help string.
70      * </p>
71      *
72      * @param e an event object containing the following fields:<ul>
73      * <li>childID [IN] - an identifier specifying the control or one of its children</li>
74      * <li>result [OUT] - the requested help string, or null</li>
75      * </ul>
76      */

77     public void getHelp(AccessibleEvent e) {
78     }
79         
80     /**
81      * Sent when an accessibility client requests the keyboard shortcut
82      * of the control, or the keyboard shortcut of a child of the control.
83      * The default behavior is to do nothing.
84      * <p>
85      * A keyboard shortcut can either be a mnemonic, or an accelerator.
86      * As a general rule, if the control or child can receive keyboard focus,
87      * then you should expose its mnemonic, and if it cannot receive keyboard
88      * focus, then you should expose its accelerator.
89      * </p><p>
90      * Return the keyboard shortcut string of the control or specified child
91      * in the <code>result</code> field of the event object. Returning an
92      * empty string tells the client that the control or child does not
93      * have a keyboard shortcut string, and returning null tells the client
94      * to use the platform keyboard shortcut string.
95      * </p>
96      *
97      * @param e an event object containing the following fields:<ul>
98      * <li>childID [IN] - an identifier specifying the control or one of its children</li>
99      * <li>result [OUT] - the requested keyboard shortcut string (example: "ALT+N"), or null</li>
100      * </ul>
101      */

102     public void getKeyboardShortcut(AccessibleEvent e) {
103     }
104         
105     /**
106      * Sent when an accessibility client requests a description
107      * of the control, or a description of a child of the control.
108      * The default behavior is to do nothing.
109      * <p>
110      * This is a textual description of the control or child's visual
111      * appearance, which is typically only necessary if it cannot be
112      * determined from other properties such as role.
113      * </p><p>
114      * Return the description of the control or specified child in
115      * the <code>result</code> field of the event object. Returning
116      * an empty string tells the client that the control or child
117      * does not have a description, and returning null tells the
118      * client to use the platform description.
119      * </p>
120      *
121      * @param e an event object containing the following fields:<ul>
122      * <li>childID [IN] - an identifier specifying the control or one of its children</li>
123      * <li>result [OUT] - the requested description string, or null</li>
124      * </ul>
125      */

126     public void getDescription(AccessibleEvent e) {
127     }
128 }
129
Popular Tags