comparison dwt/events/ShellEvent.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 649b8e223d5a
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.events.ShellEvent;
12
13 import dwt.dwthelper.utils;
14
15
16 import dwt.widgets.Event;
17
18 /**
19 * Instances of this class are sent as a result of
20 * operations being performed on shells.
21 *
22 * @see ShellListener
23 */
24
25 public final class ShellEvent extends TypedEvent {
26
27 /**
28 * A flag indicating whether the operation should be allowed.
29 * Setting this field to <code>false</code> will cancel the operation.
30 */
31 public bool doit;
32
33 static final long serialVersionUID = 3257569490479888441L;
34
35 /**
36 * Constructs a new instance of this class based on the
37 * information in the given untyped event.
38 *
39 * @param e the untyped event containing the information
40 */
41 public ShellEvent(Event e) {
42 super(e);
43 this.doit = e.doit;
44 }
45
46 /**
47 * Returns a string containing a concise, human-readable
48 * description of the receiver.
49 *
50 * @return a string representation of the event
51 */
52 public String toString() {
53 String string = super.toString ();
54 return string.substring (0, string.length() - 1) // remove trailing '}'
55 + " doit=" + doit
56 + "}";
57 }
58 }
59