comparison dwt/browser/StatusTextEvent.d @ 125:5583f8eeee6c

Synced mozilla with dwt-linux
author Jacob Carlborg <doob@me.com>
date Fri, 16 Jan 2009 12:49:08 +0100
parents d8635bb48c7c
children
comparison
equal deleted inserted replaced
124:540fa4e9974a 125:5583f8eeee6c
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2003, 2008 IBM Corporation and others. 2 * Copyright (c) 2003, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
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 *
11 * Port to the D programming language: 10 * Port to the D programming language:
12 * Jacob Carlborg <doob@me.com> 11 * John Reimer <terminal.node@gmail.com>
13 *******************************************************************************/ 12 *******************************************************************************/
14 module dwt.browser.StatusTextEvent; 13 module dwt.browser.StatusTextEvent;
15 14
16 import dwt.dwthelper.string; 15 import tango.text.convert.Format;
16
17 import dwt.dwthelper.utils; 17 import dwt.dwthelper.utils;
18
18 import dwt.events.TypedEvent; 19 import dwt.events.TypedEvent;
19 import dwt.widgets.Widget; 20 import dwt.widgets.Widget;
20 21
21 /** 22 /**
22 * A <code>StatusTextEvent</code> is sent by a {@link Browser} to 23 * A <code>StatusTextEvent</code> is sent by a {@link Browser} to
23 * {@link StatusTextListener}'s when the status text is changed. 24 * {@link StatusTextListener}'s when the status text is changed.
24 * The status text is typically displayed in the status bar of 25 * The status text is typically displayed in the status bar of
25 * a browser application. 26 * a browser application.
26 * 27 *
27 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
28 *
29 * @since 3.0 28 * @since 3.0
30 */ 29 */
31 public class StatusTextEvent : TypedEvent { 30 public class StatusTextEvent : TypedEvent {
32 /** status text */ 31 /** status text */
33 public String text; 32 public String text;
33
34 static final long serialVersionUID = 3258407348371600439L;
34 35
35 static const long serialVersionUID = 3258407348371600439L; 36 this(Widget w) {
37 super(w);
38 }
36 39
37 this (Widget w) { 40 /**
38 super(w); 41 * Returns a string containing a concise, human-readable
39 } 42 * description of the receiver.
43 *
44 * @return a string representation of the event
45 */
46 public override String toString() {
47 return Format( "{} {text = {}}",
48 super.toString[1 .. $-2], text );
49 }
40 50
41 /**
42 * Returns a string containing a concise, human-readable
43 * description of the receiver.
44 *
45 * @return a string representation of the event
46 */
47 public String toString () {
48 String string = super.toString();
49 return string.substring(0, string.length() - 1) // remove trailing '}'
50 + " text=" + text + "}";
51 }
52 } 51 }