]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleActionAdapter.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 / AccessibleActionAdapter.java
1 /*******************************************************************************
2  * Copyright (c) 2009, 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  * This adapter class provides default implementations for the
18  * methods in the <code>AccessibleActionListener</code> interface.
19  * <p>
20  * Classes that wish to deal with <code>AccessibleAction</code> events can
21  * extend this class and override only the methods that they are
22  * interested in.
23  * </p>
24  *
25  * @see AccessibleActionListener
26  * @see AccessibleActionEvent
27  *
28  * @since 3.6
29  */
30 public class AccessibleActionAdapter implements AccessibleActionListener {
31         /**
32          * Returns the number of accessible actions available in this object.
33          * <p>
34          * If there are more than one, the first one (index 0) is considered the
35          * "default" action of the object.
36          * </p>
37          *
38          * @param e an event object containing the following fields:<ul>
39          * <li>[out] count - the number of actions, or zero if there are no actions</li>
40          * </ul>
41          */
42         @Override
43         public void getActionCount(AccessibleActionEvent e) {}
44
45         /**
46          * Performs the specified action on the object.
47          *
48          * @param e an event object containing the following fields:<ul>
49          * <li>[in] index - a 0 based index specifying the action to perform.
50          *              If the index lies outside the valid range no action is performed.</li>
51          * <li>[out] result - set to {@link ACC#OK} if the action was performed.</li>
52          * </ul>
53          */
54         @Override
55         public void doAction(AccessibleActionEvent e) {}
56
57         /**
58          * Returns a description of the specified action.
59          *
60          * @param e an event object containing the following fields:<ul>
61          * <li>[in] index - a 0 based index specifying which action's description to return</li>
62          * <li>[out] result - a localized string describing the specified action,
63          *              or null if the index lies outside the valid range</li>
64          * </ul>
65          */
66         @Override
67         public void getDescription(AccessibleActionEvent e) {}
68
69         /**
70          * Returns a string representing one or more key bindings, if there
71          * are any, associated with the specified action.
72          * <p>
73          * The returned string is of the following form: mnemonic;accelerator
74          * for example: "C;CTRL+C" for the Copy item in a typical Edit menu.
75          * </p>
76          *
77          * @param e an event object containing the following fields:<ul>
78          * <li>[in] index - a 0 based index specifying which action's key bindings to return</li>
79          * <li>[out] result - a semicolon-delimited string of localized key bindings
80          *              (example: "C;CTRL+C"), or null if the index lies outside the valid range</li>
81          * </ul>
82          */
83         @Override
84         public void getKeyBinding(AccessibleActionEvent e) {}
85
86         /**
87          * Returns the name of the specified action.
88          * <p>
89          * There is no need to implement this method for single action controls
90          * since that would be redundant with AccessibleControlListener.getDefaultAction.
91          * </p>
92          *
93          * @param e an event object containing the following fields:<ul>
94          * <li>[in] index - a 0 based index specifying which action's name to return</li>
95          * <li>[in] localized - a boolean indicating whether or not to return a localized name</li>
96          * <li>[out] result - the name of the specified action,
97          *              or null if the index lies outside the valid range</li>
98          * </ul>
99          */
100         @Override
101         public void getName(AccessibleActionEvent e) {}
102 }