Mercurial > projects > dwt-mac
diff dwt/browser/LocationEvent.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 |
line wrap: on
line diff
--- a/dwt/browser/LocationEvent.d Fri Jan 16 12:19:08 2009 +0100 +++ b/dwt/browser/LocationEvent.d Fri Jan 16 12:49:08 2009 +0100 @@ -1,5 +1,5 @@ -/******************************************************************************* - * Copyright (c) 2003, 2008 IBM Corporation and others. +/******************************************************************************* + * Copyright (c) 2003, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,16 +7,16 @@ * * Contributors: * IBM Corporation - initial API and implementation - * * Port to the D programming language: - * Jacob Carlborg <doob@me.com> + * John Reimer <terminal.node@gmail.com> *******************************************************************************/ module dwt.browser.LocationEvent; +import tango.text.convert.Format; + import dwt.events.TypedEvent; import dwt.widgets.Widget; - -import dwt.dwthelper.string; +import dwt.dwthelper.utils; /** * A <code>LocationEvent</code> is sent by a {@link Browser} to @@ -26,20 +26,18 @@ * {@link Browser#setUrl(String)} or when the user activates a * hyperlink. * - * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * * @since 3.0 */ public class LocationEvent : TypedEvent { /** current location */ public String location; - + /** * A flag indicating whether the location opens in the top frame * or not. */ public bool top; - + /** * A flag indicating whether the location loading should be allowed. * Setting this field to <code>false</code> will cancel the operation. @@ -47,20 +45,19 @@ public bool doit; static final long serialVersionUID = 3906644198244299574L; - -this (Widget w) { + +this(Widget w) { super(w); } /** - * Returns a String containing a concise, human-readable + * Returns a string containing a concise, human-readable * description of the receiver. * - * @return a String representation of the event + * @return a string representation of the event */ -public String toString () { - String str = super.toString(); - return str.substring(0, str.length() - 1) // remove trailing '}' - + " location=" + location + " top=" + top + " doit=" + doit + "}"; +public override String toString() { + return Format( "{} {location = {}, top = {}, doit = {}}", + super.toString[1 .. $-2], location, top, doit ); } }