comparison dwt/custom/TextChangingEvent.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 1a8b3cb347e0
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
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 module dwt.custom;
12
13
14 import dwt.events.*;
15
16 /**
17 * This event is sent by the StyledTextContent implementor when a change
18 * to the text is about to occur.
19 */
20 public class TextChangingEvent : TypedEvent {
21 /**
22 * Start offset of the text that is going to be replaced
23 */
24 public int start;
25 /**
26 * Text that is going to be inserted or empty String
27 * if no text will be inserted
28 */
29 public String newText;
30 /**
31 * Length of text that is going to be replaced
32 */
33 public int replaceCharCount;
34 /**
35 * Length of text that is going to be inserted
36 */
37 public int newCharCount;
38 /**
39 * Number of lines that are going to be replaced
40 */
41 public int replaceLineCount;
42 /**
43 * Number of new lines that are going to be inserted
44 */
45 public int newLineCount;
46
47 static final long serialVersionUID = 3257290210114352439L;
48
49 /**
50 * Create the TextChangedEvent to be used by the StyledTextContent implementor.
51 * <p>
52 *
53 * @param source the object that will be sending the new TextChangingEvent,
54 * cannot be null
55 */
56 public TextChangingEvent(StyledTextContent source) {
57 super(source);
58 }
59 TextChangingEvent(StyledTextContent source, StyledTextEvent e) {
60 super(source);
61 start = e.start;
62 replaceCharCount = e.replaceCharCount;
63 newCharCount = e.newCharCount;
64 replaceLineCount = e.replaceLineCount;
65 newLineCount = e.newLineCount;
66 newText = e.text;
67 }
68
69 }