Mercurial > projects > dwt-linux
comparison dwt/browser/StatusTextEvent.d @ 302:bfe1c57259e3
More browser code ported
author | John Reimer<terminal.node@gmail.com> |
---|---|
date | Tue, 12 Aug 2008 21:11:17 -0700 |
parents | 93409d9838c5 |
children | 3f4a5c7d138f |
comparison
equal
deleted
inserted
replaced
301:d1474e6bb509 | 302:bfe1c57259e3 |
---|---|
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * Port to the D programming language: | |
11 * John Reimer <terminal.node@gmail.com> | |
10 *******************************************************************************/ | 12 *******************************************************************************/ |
11 module dwt.browser.StatusTextEvent; | 13 module dwt.browser.StatusTextEvent; |
12 | 14 |
13 import dwt.dwthelper.utils; | 15 //import dwt.dwthelper.utils; |
14 | 16 |
15 import dwt.events.TypedEvent; | 17 import dwt.events.TypedEvent; |
16 import dwt.widgets.Widget; | 18 import dwt.widgets.Widget; |
17 | 19 |
18 /** | 20 /** |
21 * The status text is typically displayed in the status bar of | 23 * The status text is typically displayed in the status bar of |
22 * a browser application. | 24 * a browser application. |
23 * | 25 * |
24 * @since 3.0 | 26 * @since 3.0 |
25 */ | 27 */ |
26 public class StatusTextEvent extends TypedEvent { | 28 public class StatusTextEvent : TypedEvent { |
27 /** status text */ | 29 /** status text */ |
28 public String text; | 30 public String text; |
29 | 31 |
30 static final long serialVersionUID = 3258407348371600439L; | 32 static final long serialVersionUID = 3258407348371600439L; |
31 | 33 |
32 StatusTextEvent(Widget w) { | 34 this(Widget w) { |
33 super(w); | 35 super(w); |
34 } | 36 } |
35 | 37 |
36 /** | 38 /** |
37 * Returns a string containing a concise, human-readable | 39 * Returns a string containing a concise, human-readable |
38 * description of the receiver. | 40 * description of the receiver. |
39 * | 41 * |
40 * @return a string representation of the event | 42 * @return a string representation of the event |
41 */ | 43 */ |
42 public String toString() { | 44 public override String toString() { |
43 String string = super.toString (); | 45 return Format( "{} {text = {}}", |
44 return string.substring (0, string.length() - 1) // remove trailing '}' | 46 super.toString[1 .. $-2], text ); |
45 + " text=" + text | |
46 + "}"; | |
47 } | 47 } |
48 | |
48 } | 49 } |