comparison dwt/browser/LocationEvent.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 44258e0b6687
children eec6ddb07873
comparison
equal deleted inserted replaced
287:9cbe6285f746 288:4ee8c4237614
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 * Port to the D programming language:
11 * John Reimer <terminal.node@gmail.com>
10 *******************************************************************************/ 12 *******************************************************************************/
11 module dwt.browser.LocationEvent; 13 module dwt.browser.LocationEvent;
12 14
13 import dwt.dwthelper.utils; 15 import dwt.dwthelper.utils;
14 16
23 * {@link Browser#setUrl(String)} or when the user activates a 25 * {@link Browser#setUrl(String)} or when the user activates a
24 * hyperlink. 26 * hyperlink.
25 * 27 *
26 * @since 3.0 28 * @since 3.0
27 */ 29 */
28 public class LocationEvent extends TypedEvent { 30 public class LocationEvent : TypedEvent {
29 /** current location */ 31 /** current location */
30 public String location; 32 public String location;
31 33
32 /** 34 /**
33 * A flag indicating whether the location opens in the top frame 35 * A flag indicating whether the location opens in the top frame
51 * Returns a string containing a concise, human-readable 53 * Returns a string containing a concise, human-readable
52 * description of the receiver. 54 * description of the receiver.
53 * 55 *
54 * @return a string representation of the event 56 * @return a string representation of the event
55 */ 57 */
56 public String toString() { 58 public override String toString() {
57 String string = super.toString (); 59 return Format( "{} {location = {}, top = {}, doit = {}}",
58 return string.substring (0, string.length() - 1) // remove trailing '}' 60 super.toString[1 .. $-2], location, top, doit );
59 + " location=" + location
60 + " top=" + top
61 + " doit=" + doit
62 + "}";
63 } 61 }
64 } 62 }