Mercurial > projects > dwt-linux
annotate dwt/internal/SWTEventObject.d @ 10:63c023465156
moved from org.eclipse.swt to dwt
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 05 Jan 2008 17:58:37 +0100 |
parents | ad2b69216039 |
children | 8cec8f536af3 |
rev | line source |
---|---|
1 | 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 *******************************************************************************/ | |
10
63c023465156
moved from org.eclipse.swt to dwt
Frank Benoit <benoit@tionex.de>
parents:
9
diff
changeset
|
11 module dwt.internal.SWTEventObject; |
1 | 12 |
13 | |
14 //import java.util.EventObject; | |
15 import tango.core.Exception; | |
16 | |
17 ///PORTING_TYPE | |
18 class EventObject { | |
19 protected Object source; | |
20 | |
21 public this(Object source) { | |
22 if (source is null) | |
23 throw new IllegalArgumentException( "null arg" ); | |
24 this.source = source; | |
25 } | |
26 | |
27 public Object getSource() { | |
28 return source; | |
29 } | |
30 | |
31 public override char[] toString() { | |
32 return this.classinfo.name ~ "[source=" ~ source.toString() ~ "]"; | |
33 } | |
34 } | |
35 | |
36 | |
37 | |
38 | |
39 /** | |
40 * This class is the cross-platform version of the | |
41 * java.util.EventObject class. | |
42 * <p> | |
43 * It is part of our effort to provide support for both J2SE | |
44 * and J2ME platforms. Under this scheme, classes need to | |
45 * extend SWTEventObject instead of java.util.EventObject. | |
46 * </p> | |
47 * <p> | |
48 * Note: java.util.EventObject is not part of CDC and CLDC. | |
49 * </p> | |
50 */ | |
51 public class SWTEventObject : EventObject { | |
52 | |
53 //static final long serialVersionUID = 3258125873411470903L; | |
54 | |
55 /** | |
56 * Constructs a new instance of this class. | |
57 * | |
58 * @param source the object which fired the event | |
59 */ | |
60 public this(Object source) { | |
61 super(source); | |
62 } | |
63 } |