KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > custom > ExtendedModifyEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.swt.custom;
12
13 import org.eclipse.swt.events.*;
14
15 /**
16  * This event is sent after a text change occurs.
17  */

18 public final class ExtendedModifyEvent extends TypedEvent {
19     /** start offset of the new text */
20     public int start;
21     /** length of the new text */
22     public int length;
23     /** replaced text or empty string if no text was replaced */
24     public String JavaDoc replacedText;
25     
26     static final long serialVersionUID = 3258696507027830832L;
27     
28 public ExtendedModifyEvent(StyledTextEvent e) {
29     super(e);
30     start = e.start;
31     length = e.end - e.start;
32     replacedText = e.text;
33 }
34 }
35
Popular Tags