Mercurial > projects > dwt-linux
annotate dwt/browser.old/TitleEvent.d @ 288:4ee8c4237614
old branches... commit by mistake
author | John Reimer<terminal.node@gmail.com> |
---|---|
date | Tue, 05 Aug 2008 18:00:50 -0700 |
parents | |
children |
rev | line source |
---|---|
288
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
1 /******************************************************************************* |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2003, 2004 IBM Corporation and others. |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
3 * All rights reserved. This program and the accompanying materials |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
5 * which accompanies this distribution, and is available at |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
6 * http://www.eclipse.org/legal/epl-v10.html |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
7 * |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
8 * Contributors: |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
9 * IBM Corporation - initial API and implementation |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
10 *******************************************************************************/ |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
11 module dwt.browser.TitleEvent; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
12 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
13 import dwt.dwthelper.utils; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
14 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
15 import dwt.events.TypedEvent; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
16 import dwt.widgets.Widget; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
17 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
18 /** |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
19 * A <code>TitleEvent</code> is sent by a {@link Browser} to |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
20 * {@link TitleListener}'s when the title of the current document |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
21 * is available or when it is modified. |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
22 * |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
23 * @since 3.0 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
24 */ |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
25 public class TitleEvent extends TypedEvent { |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
26 /** the title of the current document */ |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
27 public String title; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
28 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
29 static final long serialVersionUID = 4121132532906340919L; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
30 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
31 TitleEvent(Widget w) { |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
32 super(w); |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
33 } |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
34 |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
35 /** |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
36 * Returns a string containing a concise, human-readable |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
37 * description of the receiver. |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
38 * |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
39 * @return a string representation of the event |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
40 */ |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
41 public String toString() { |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
42 String string = super.toString (); |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
43 return string.substring (0, string.length() - 1) // remove trailing '}' |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
44 + " title=" + title |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
45 + "}"; |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
46 } |
4ee8c4237614
old branches... commit by mistake
John Reimer<terminal.node@gmail.com>
parents:
diff
changeset
|
47 } |