01: /*******************************************************************************
02: * Copyright (c) 2000, 2003 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.swt.accessibility;
11:
12: /**
13: * This adapter class provides default implementations for the
14: * methods described by the <code>AccessibleTextListener</code> interface.
15: * <p>
16: * Classes that wish to deal with <code>AccessibleTextEvent</code>s can
17: * extend this class and override only the methods that they are
18: * interested in.
19: * </p><p>
20: * Note: Accessibility clients use child identifiers to specify
21: * whether they want information about a control or one of its children.
22: * Child identifiers are increasing integers beginning with 0.
23: * The identifier CHILDID_SELF represents the control itself.
24: * When returning a child identifier to a client, you may use CHILDID_NONE
25: * to indicate that no child or control has the required information.
26: * </p><p>
27: * Note: This adapter is typically used by implementors of
28: * a custom control to provide very detailed information about
29: * the control instance to accessibility clients.
30: * </p>
31: *
32: * @see AccessibleTextListener
33: * @see AccessibleTextEvent
34: *
35: * @since 3.0
36: */
37: public abstract class AccessibleTextAdapter implements
38: AccessibleTextListener {
39:
40: /**
41: * Sent when an accessibility client requests the current character offset
42: * of the text caret.
43: * The default behavior is to do nothing.
44: * <p>
45: * Return the caret offset in the <code>offset</code>
46: * field of the event object.
47: * </p>
48: *
49: * @param e an event object containing the following fields:<ul>
50: * <li>childID [IN] - an identifier specifying a child of the control</li>
51: * <li>offset [OUT] - the current offset of the text caret</li>
52: * </ul>
53: */
54: public void getCaretOffset(AccessibleTextEvent e) {
55: }
56:
57: /**
58: * Sent when an accessibility client requests the range of the current
59: * text selection.
60: * The default behavior is to do nothing.
61: * <p>
62: * Return the selection start offset and non-negative length in the
63: * <code>offset</code> and <code>length</code> fields of the event object.
64: * </p>
65: *
66: * @param e an event object containing the following fields:<ul>
67: * <li>childID [IN] - an identifier specifying a child of the control</li>
68: * <li>offset [OUT] - the offset of the current text selection</li>
69: * <li>length [OUT] - the length of the current text selection</li>
70: * </ul>
71: */
72: public void getSelectionRange(AccessibleTextEvent e) {
73: }
74: }
|