]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleAdapter.java
Merge branch 'bug-623' into release/1.43.0
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / accessibility / AccessibleAdapter.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2016 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.accessibility;
15
16
17 /**
18  * This adapter class provides default implementations for the
19  * methods described by the <code>AccessibleListener</code> interface.
20  * <p>
21  * Classes that wish to deal with <code>AccessibleEvent</code>s can
22  * extend this class and override only the methods that they are
23  * interested in.
24  * </p><p>
25  * Note: Accessibility clients use child identifiers to specify
26  * whether they want information about a control or one of its children.
27  * Child identifiers are increasing integers beginning with 0.
28  * The identifier CHILDID_SELF represents the control itself.
29  * </p>
30  *
31  * @see AccessibleListener
32  * @see AccessibleEvent
33  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
34  *
35  * @since 2.0
36  */
37 public abstract class AccessibleAdapter implements AccessibleListener {
38
39         /**
40          * Sent when an accessibility client requests the name
41          * of the control, or the name of a child of the control.
42          * The default behavior is to do nothing.
43          * <p>
44          * Return the name of the control or specified child in the
45          * <code>result</code> field of the event object. Returning
46          * an empty string tells the client that the control or child
47          * does not have a name, and returning null tells the client
48          * to use the platform name.
49          * </p>
50          *
51          * @param e an event object containing the following fields:<ul>
52          *    <li>childID [IN] - an identifier specifying the control or one of its children</li>
53          *    <li>result [OUT] - the requested name string, or null</li>
54          * </ul>
55          */
56         @Override
57         public void getName(AccessibleEvent e) {
58         }
59
60         /**
61          * Sent when an accessibility client requests the help string
62          * of the control, or the help string of a child of the control.
63          * The default behavior is to do nothing.
64          * <p>
65          * The information in this property should be similar to the help
66          * provided by toolTipText. It describes what the control or child
67          * does or how to use it, as opposed to getDescription, which
68          * describes appearance.
69          * </p><p>
70          * Return the help string of the control or specified child in
71          * the <code>result</code> field of the event object. Returning
72          * an empty string tells the client that the control or child
73          * does not have a help string, and returning null tells the
74          * client to use the platform help string.
75          * </p>
76          *
77          * @param e an event object containing the following fields:<ul>
78          *    <li>childID [IN] - an identifier specifying the control or one of its children</li>
79          *    <li>result [OUT] - the requested help string, or null</li>
80          * </ul>
81          */
82         @Override
83         public void getHelp(AccessibleEvent e) {
84         }
85
86         /**
87          * Sent when an accessibility client requests the keyboard shortcut
88          * of the control, or the keyboard shortcut of a child of the control.
89          * The default behavior is to do nothing.
90          * <p>
91          * A keyboard shortcut can either be a mnemonic, or an accelerator.
92          * As a general rule, if the control or child can receive keyboard focus,
93          * then you should expose its mnemonic, and if it cannot receive keyboard
94          * focus, then you should expose its accelerator.
95          * </p><p>
96          * Return the keyboard shortcut string of the control or specified child
97          * in the <code>result</code> field of the event object. Returning an
98          * empty string tells the client that the control or child does not
99          * have a keyboard shortcut string, and returning null tells the client
100          * to use the platform keyboard shortcut string.
101          * </p>
102          *
103          * @param e an event object containing the following fields:<ul>
104          *    <li>childID [IN] - an identifier specifying the control or one of its children</li>
105          *    <li>result [OUT] - the requested keyboard shortcut string (example: "ALT+N"), or null</li>
106          * </ul>
107          */
108         @Override
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         @Override
134         public void getDescription(AccessibleEvent e) {
135         }
136 }