Mercurial > projects > dwt-mac
comparison dwt/browser/TitleEvent.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | f565d3a95c0a |
children | 5583f8eeee6c |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2003, 2004 IBM Corporation and others. | 2 * Copyright (c) 2003, 2008 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 * | 10 * |
11 * Port to the D programming language: | 11 * Port to the D programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <doob@me.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.browser.TitleEvent; | 14 module dwt.browser.TitleEvent; |
15 | 15 |
16 import dwt.dwthelper.utils; | 16 import dwt.dwthelper.utils; |
17 import dwt.dwthelper.string; | 17 import dwt.dwthelper.string; |
21 /** | 21 /** |
22 * A <code>TitleEvent</code> is sent by a {@link Browser} to | 22 * A <code>TitleEvent</code> is sent by a {@link Browser} to |
23 * {@link TitleListener}'s when the title of the current document | 23 * {@link TitleListener}'s when the title of the current document |
24 * is available or when it is modified. | 24 * is available or when it is modified. |
25 * | 25 * |
26 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
27 * | |
26 * @since 3.0 | 28 * @since 3.0 |
27 */ | 29 */ |
28 public class TitleEvent : TypedEvent { | 30 public class TitleEvent : TypedEvent { |
29 /** the title of the current document */ | 31 /** the title of the current document */ |
30 public String title; | 32 public String title; |
34 this (Widget w) { | 36 this (Widget w) { |
35 super(w); | 37 super(w); |
36 } | 38 } |
37 | 39 |
38 /** | 40 /** |
39 * Returns a String containing a concise, human-readable | 41 * Returns a string containing a concise, human-readable |
40 * description of the receiver. | 42 * description of the receiver. |
41 * | 43 * |
42 * @return a String representation of the event | 44 * @return a string representation of the event |
43 */ | 45 */ |
44 public String toString () { | 46 public String toString () { |
45 String str = super.toString(); | 47 String str = super.toString(); |
46 return str.substring(0, String.length() - 1) // remove trailing '}' | 48 return str.substring(0, string.length() - 1) // remove trailing '}' |
47 + " title=" + title + "}"; | 49 + " title=" + title + "}"; |
48 } | 50 } |
49 } | 51 } |