]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/events/ShellEvent.java
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / events / ShellEvent.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  * operations being performed on shells.
22  *
23  * @see ShellListener
24  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
25  */
26
27 public final class ShellEvent extends TypedEvent {
28
29         /**
30          * A flag indicating whether the operation should be allowed.
31          * Setting this field to <code>false</code> will cancel the operation.
32          */
33         public boolean doit;
34
35         static final long serialVersionUID = 3257569490479888441L;
36
37 /**
38  * Constructs a new instance of this class based on the
39  * information in the given untyped event.
40  *
41  * @param e the untyped event containing the information
42  */
43 public ShellEvent(Event e) {
44         super(e);
45         this.doit = e.doit;
46 }
47
48 /**
49  * Returns a string containing a concise, human-readable
50  * description of the receiver.
51  *
52  * @return a string representation of the event
53  */
54 @Override
55 public String toString() {
56         String string = super.toString ();
57         return string.substring (0, string.length() - 1) // remove trailing '}'
58                 + " doit=" + doit
59                 + "}";
60 }
61 }
62