1 /*******************************************************************************
2  * Copyright (c) 2000, 2011 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.custom;
15 
16 import org.eclipse.swt.events.*;
17 
18 /**
19  * This event is sent after a text change occurs.
20  *
21  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
22  */
23 public final class ExtendedModifyEvent extends TypedEvent {
24 	/** start offset of the new text */
25 	public int start;
26 	/** length of the new text */
27 	public int length;
28 	/** replaced text or empty string if no text was replaced */
29 	public String replacedText;
30 
31 	static final long serialVersionUID = 3258696507027830832L;
32 
33 /**
34  * Constructs a new instance of this class based on the
35  * information in the given event.
36  *
37  * @param e the event containing the information
38  */
ExtendedModifyEvent(StyledTextEvent e)39 public ExtendedModifyEvent(StyledTextEvent e) {
40 	super(e);
41 	start = e.start;
42 	length = e.end - e.start;
43 	replacedText = e.text;
44 }
45 }
46