1 /*******************************************************************************
2 * Copyright (c) 2009, 2016 IBM Corporation and others.
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/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.accessibility;
17 * This adapter class provides default implementations for the
18 * methods in the <code>AccessibleAttributeListener</code> interface.
20 * Classes that wish to deal with <code>AccessibleAttribute</code> events can
21 * extend this class and override only the methods that they are
25 * @see AccessibleAttributeListener
26 * @see AccessibleAttributeEvent
27 * @see AccessibleTextAttributeEvent
31 public class AccessibleAttributeAdapter implements AccessibleAttributeListener {
33 * Returns attributes specific to this Accessible object.
35 * @param e an event object containing the following fields:<ul>
36 * <li>[out] topMargin - the top margin in pixels</li>
37 * <li>[out] bottomMargin - the bottom margin in pixels</li>
38 * <li>[out] leftMargin - the left margin in pixels</li>
39 * <li>[out] rightMargin - the right margin in pixels</li>
40 * <li>[out] tabStops - an array of pixel locations</li>
41 * <li>[out] justify - whether or not to justify the text</li>
42 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
43 * <li>[out] indent - the indent in pixels</li>
44 * <li>[out] groupLevel - the level of this accessible in its group</li>
45 * <li>[out] groupCount - the number of similar children in this accessible's group</li>
46 * <li>[out] groupIndex - the index of this accessible in its group</li>
47 * <li>[out] attributes - an array of alternating key and value Strings
48 * which represent additional (i.e. non predefined) attributes</li>
52 public void getAttributes(AccessibleAttributeEvent e) {}
55 * Returns text attributes specific to this Accessible object.
57 * @param e an event object containing the following fields:<ul>
58 * <li>[in] offset - the 0 based text offset for which to return attribute information</li>
59 * <li>[out] start - the 0 based starting offset of the character range
60 * over which all text attributes match those of offset</li>
61 * <li>[out] end - the 0 based offset after the last character of the character range
62 * over which all text attributes match those of offset</li>
63 * <li>[out] textStyle - the TextStyle of the character range</li>
64 * <li>[out] attributes - an array of alternating key and value Strings
65 * that represent additional attributes that do not correspond to TextStyle fields</li>
69 public void getTextAttributes(AccessibleTextAttributeEvent e) {}