1 /*******************************************************************************
2 * Copyright (c) 2000, 2011 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.custom;
16 import org.eclipse.swt.events.*;
19 * This event is sent when a line is about to be drawn.
21 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
23 public class LineStyleEvent extends TypedEvent {
26 * line start offset (input)
28 public int lineOffset;
33 public String lineText;
36 * line ranges (output)
43 * line styles (output)
45 * Note: Because a StyleRange includes the start and length, the
46 * same instance cannot occur multiple times in the array of styles.
47 * If the same style attributes, such as font and color, occur in
48 * multiple StyleRanges, <code>ranges</code> can be used to share
49 * styles and reduce memory usage.
51 public StyleRange[] styles;
54 * line alignment (input, output)
61 * line indent (input, output)
68 * line vertical indent (input, output)
75 * line wrap indent (input, output)
79 public int wrapIndent;
82 * line justification (input, output)
86 public boolean justify;
89 * line bullet (output)
95 * line bullet index (output)
98 public int bulletIndex;
101 * line tab stops (output)
104 public int[] tabStops;
107 static final long serialVersionUID = 3906081274027192884L;
110 * Constructs a new instance of this class based on the
111 * information in the given event.
113 * @param e the event containing the information
115 public LineStyleEvent(StyledTextEvent e) {
119 lineOffset = e.detail;
121 alignment = e.alignment;
124 verticalIndent = e.verticalIndent;
125 wrapIndent = e.wrapIndent;
127 bulletIndex = e.bulletIndex;
128 tabStops = e.tabStops;