25
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2008 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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module org.eclipse.swt.accessibility.AccessibleAdapter;
|
|
14
|
|
15 import java.lang.all;
|
|
16
|
|
17 import org.eclipse.swt.accessibility.AccessibleListener;
|
|
18 import org.eclipse.swt.accessibility.AccessibleEvent;
|
|
19
|
|
20 /**
|
|
21 * This adapter class provides default implementations for the
|
|
22 * methods described by the <code>AccessibleListener</code> interface.
|
|
23 * <p>
|
|
24 * Classes that wish to deal with <code>AccessibleEvent</code>s can
|
|
25 * extend this class and override only the methods that they are
|
|
26 * interested in.
|
|
27 * </p><p>
|
|
28 * Note: Accessibility clients use child identifiers to specify
|
|
29 * whether they want information about a control or one of its children.
|
|
30 * Child identifiers are increasing integers beginning with 0.
|
|
31 * The identifier CHILDID_SELF represents the control itself.
|
|
32 * </p>
|
|
33 *
|
|
34 * @see AccessibleListener
|
|
35 * @see AccessibleEvent
|
|
36 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
|
|
37 *
|
|
38 * @since 2.0
|
|
39 */
|
|
40 public abstract class AccessibleAdapter : AccessibleListener {
|
|
41
|
|
42 /**
|
|
43 * Sent when an accessibility client requests the name
|
|
44 * of the control, or the name of a child of the control.
|
|
45 * The default behavior is to do nothing.
|
|
46 * <p>
|
|
47 * Return the name of the control or specified child in the
|
|
48 * <code>result</code> field of the event object. Returning
|
|
49 * an empty string tells the client that the control or child
|
|
50 * does not have a name, and returning null tells the client
|
|
51 * to use the platform name.
|
|
52 * </p>
|
|
53 *
|
|
54 * @param e an event object containing the following fields:<ul>
|
|
55 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
56 * <li>result [OUT] - the requested name string, or null</li>
|
|
57 * </ul>
|
|
58 */
|
|
59 public void getName(AccessibleEvent e) {
|
|
60 }
|
|
61
|
|
62 /**
|
|
63 * Sent when an accessibility client requests the help string
|
|
64 * of the control, or the help string of a child of the control.
|
|
65 * The default behavior is to do nothing.
|
|
66 * <p>
|
|
67 * The information in this property should be similar to the help
|
|
68 * provided by toolTipText. It describes what the control or child
|
|
69 * does or how to use it, as opposed to getDescription, which
|
|
70 * describes appearance.
|
|
71 * </p><p>
|
|
72 * Return the help string of the control or specified child in
|
|
73 * the <code>result</code> field of the event object. Returning
|
|
74 * an empty string tells the client that the control or child
|
|
75 * does not have a help string, and returning null tells the
|
|
76 * client to use the platform help string.
|
|
77 * </p>
|
|
78 *
|
|
79 * @param e an event object containing the following fields:<ul>
|
|
80 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
81 * <li>result [OUT] - the requested help string, or null</li>
|
|
82 * </ul>
|
|
83 */
|
|
84 public void getHelp(AccessibleEvent e) {
|
|
85 }
|
|
86
|
|
87 /**
|
|
88 * Sent when an accessibility client requests the keyboard shortcut
|
|
89 * of the control, or the keyboard shortcut of a child of the control.
|
|
90 * The default behavior is to do nothing.
|
|
91 * <p>
|
|
92 * A keyboard shortcut can either be a mnemonic, or an accelerator.
|
|
93 * As a general rule, if the control or child can receive keyboard focus,
|
|
94 * then you should expose its mnemonic, and if it cannot receive keyboard
|
|
95 * focus, then you should expose its accelerator.
|
|
96 * </p><p>
|
|
97 * Return the keyboard shortcut string of the control or specified child
|
|
98 * in the <code>result</code> field of the event object. Returning an
|
|
99 * empty string tells the client that the control or child does not
|
|
100 * have a keyboard shortcut string, and returning null tells the client
|
|
101 * to use the platform keyboard shortcut string.
|
|
102 * </p>
|
|
103 *
|
|
104 * @param e an event object containing the following fields:<ul>
|
|
105 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
106 * <li>result [OUT] - the requested keyboard shortcut string (example: "ALT+N"), or null</li>
|
|
107 * </ul>
|
|
108 */
|
|
109 public void getKeyboardShortcut(AccessibleEvent e) {
|
|
110 }
|
|
111
|
|
112 /**
|
|
113 * Sent when an accessibility client requests a description
|
|
114 * of the control, or a description of a child of the control.
|
|
115 * The default behavior is to do nothing.
|
|
116 * <p>
|
|
117 * This is a textual description of the control or child's visual
|
|
118 * appearance, which is typically only necessary if it cannot be
|
|
119 * determined from other properties such as role.
|
|
120 * </p><p>
|
|
121 * Return the description of the control or specified child in
|
|
122 * the <code>result</code> field of the event object. Returning
|
|
123 * an empty string tells the client that the control or child
|
|
124 * does not have a description, and returning null tells the
|
|
125 * client to use the platform description.
|
|
126 * </p>
|
|
127 *
|
|
128 * @param e an event object containing the following fields:<ul>
|
|
129 * <li>childID [IN] - an identifier specifying the control or one of its children</li>
|
|
130 * <li>result [OUT] - the requested description string, or null</li>
|
|
131 * </ul>
|
|
132 */
|
|
133 public void getDescription(AccessibleEvent e) {
|
|
134 }
|
|
135 }
|