]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/events/VerifyEvent.java
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / events / VerifyEvent.java
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.events;
15
16
17 import org.eclipse.swt.widgets.Event;
18
19 /**
20  * Instances of this class are sent as a result of
21  * widgets handling keyboard events
22  *
23  * @see VerifyListener
24  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
25  */
26
27 public final class VerifyEvent extends KeyEvent {
28
29         /**
30          * the range of text being modified.
31          * Setting these fields has no effect.
32          */
33         public int start, end;
34
35         /**
36          * the new text that will be inserted.
37          * Setting this field will change the text that is about to
38          * be inserted or deleted.
39          */
40         public String text;
41
42         static final long serialVersionUID = 3257003246269577014L;
43
44 /**
45  * Constructs a new instance of this class based on the
46  * information in the given untyped event.
47  *
48  * @param e the untyped event containing the information
49  */
50 public VerifyEvent(Event e) {
51         super(e);
52         this.start = e.start;
53         this.end = e.end;
54         this.text = e.text;
55 }
56
57 /**
58  * Returns a string containing a concise, human-readable
59  * description of the receiver.
60  *
61  * @return a string representation of the event
62  */
63 @Override
64 public String toString() {
65         String string = super.toString ();
66         return string.substring (0, string.length() - 1) // remove trailing '}'
67                 + " start=" + start
68                 + " end=" + end
69                 + " text=" + text
70                 + "}";
71 }
72 }