comparison dwt/browser/LocationEvent.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children f565d3a95c0a
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2003, 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 *
11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/
14 module dwt.browser.LocationEvent;
15
16 import dwt.events.TypedEvent;
17 import dwt.widgets.Widget;
18
19 import dwt.dwthelper.string;
20
21 /**
22 * A <code>LocationEvent</code> is sent by a {@link Browser} to
23 * {@link LocationListener}'s when the <code>Browser</code>
24 * navigates to a different URL. This notification typically
25 * occurs when the application navigates to a new location with
26 * {@link Browser#setUrl(String)} or when the user activates a
27 * hyperlink.
28 *
29 * @since 3.0
30 */
31 public class LocationEvent : TypedEvent {
32 /** current location */
33 public String location;
34
35 /**
36 * A flag indicating whether the location opens in the top frame
37 * or not.
38 */
39 public bool top;
40
41 /**
42 * A flag indicating whether the location loading should be allowed.
43 * Setting this field to <code>false</code> will cancel the operation.
44 */
45 public bool doit;
46
47 static final long serialVersionUID = 3906644198244299574L;
48
49 this (Widget w) {
50 super(w);
51 }
52
53 /**
54 * Returns a String containing a concise, human-readable
55 * description of the receiver.
56 *
57 * @return a String representation of the event
58 */
59 public String toString () {
60 String String = super.toString();
61 return String.substring(0, String.length() - 1) // remove trailing '}'
62 + " location=" + location + " top=" + top + " doit=" + doit + "}";
63 }
64 }