1 /*******************************************************************************
2 * Copyright (c) 2009, 2017 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;
19 * Instances of this class are sent as a result of accessibility clients
20 * sending AccessibleAttribute messages to an accessible object.
22 * @see AccessibleAttributeListener
23 * @see AccessibleAttributeAdapter
27 public class AccessibleAttributeEvent extends EventObject {
30 * [out] the top margin in pixels
32 * @see AccessibleAttributeListener#getAttributes
37 * [out] the bottom margin in pixels
39 * @see AccessibleAttributeListener#getAttributes
41 public int bottomMargin;
44 * [out] the left margin in pixels
46 * @see AccessibleAttributeListener#getAttributes
48 public int leftMargin;
51 * [out] the right margin in pixels
53 * @see AccessibleAttributeListener#getAttributes
55 public int rightMargin;
58 * [out] an array of pixel locations representing tab stops
60 * @see AccessibleAttributeListener#getAttributes
62 public int[] tabStops;
65 * [out] whether or not to justify the text
67 * @see AccessibleAttributeListener#getAttributes
69 public boolean justify;
72 * [out] the alignment, which is one of SWT#LEFT, SWT#RIGHT or SWT#CENTER
74 * @see AccessibleAttributeListener#getAttributes
79 * [out] the indent in pixels
81 * @see AccessibleAttributeListener#getAttributes
86 * [out] the 1-based level of this accessible in its group
87 * (0 means "not applicable")
89 * @see AccessibleAttributeListener#getAttributes
92 public int groupLevel;
94 * [out] the 1-based number of similar children in this accessible's group,
95 * including this accessible (0 means "not applicable")
97 * @see AccessibleAttributeListener#getAttributes
100 public int groupCount;
102 * [out] the 1-based index of this accessible in its group
103 * (0 means "not applicable")
105 * @see AccessibleAttributeListener#getAttributes
108 public int groupIndex;
111 * [out] an array of alternating key and value Strings which
112 * represent additional (i.e. non predefined) attributes
114 * @see AccessibleAttributeListener#getAttributes
116 public String [] attributes;
118 static final long serialVersionUID = -2894665777259297851L;
121 * Constructs a new instance of this class.
123 * @param source the object that fired the event
125 public AccessibleAttributeEvent(Object source) {
130 * Returns a string containing a concise, human-readable
131 * description of the receiver.
133 * @return a string representation of the event
136 public String toString () {
137 return "AccessibleAttributeEvent {" //$NON-NLS-1$
138 + " topMargin=" + topMargin //$NON-NLS-1$
139 + " bottomMargin=" + bottomMargin //$NON-NLS-1$
140 + " leftMargin=" + leftMargin //$NON-NLS-1$
141 + " rightMargin=" + rightMargin //$NON-NLS-1$
142 + " tabStops=" + tabStops //$NON-NLS-1$
143 + " justify=" + justify //$NON-NLS-1$
144 + " alignment=" + alignment //$NON-NLS-1$
145 + " indent=" + indent //$NON-NLS-1$
146 + " groupLevel=" + groupLevel //$NON-NLS-1$
147 + " groupCount=" + groupCount //$NON-NLS-1$
148 + " groupIndex=" + groupIndex //$NON-NLS-1$