25
|
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 * Port to the D programming language:
|
|
11 * John Reimer <terminal.node@gmail.com>
|
|
12 *******************************************************************************/
|
|
13 module org.eclipse.swt.browser.ProgressEvent;
|
|
14
|
|
15 import tango.text.convert.Format;
|
|
16
|
|
17 import java.lang.all;
|
|
18
|
|
19 import org.eclipse.swt.events.TypedEvent;
|
|
20 import org.eclipse.swt.widgets.Widget;
|
|
21
|
|
22 /**
|
|
23 * A <code>ProgressEvent</code> is sent by a {@link Browser} to
|
|
24 * {@link ProgressListener}'s when a progress is made during the
|
|
25 * loading of the current URL or when the loading of the current
|
|
26 * URL has been completed.
|
|
27 *
|
|
28 * @since 3.0
|
|
29 */
|
|
30 public class ProgressEvent : TypedEvent {
|
|
31 /** current value */
|
|
32 public int current;
|
|
33 /** total value */
|
|
34 public int total;
|
|
35
|
|
36 static final long serialVersionUID = 3977018427045393972L;
|
|
37
|
|
38 this(Widget w) {
|
|
39 super(w);
|
|
40 }
|
|
41
|
|
42 /**
|
|
43 * Returns a string containing a concise, human-readable
|
|
44 * description of the receiver.
|
|
45 *
|
|
46 * @return a string representation of the event
|
|
47 */
|
|
48 public override String toString() {
|
|
49 return Format( "{} {current = {}, total = {}}",
|
|
50 super.toString[1 .. $-2], current, total );
|
|
51 }
|
|
52 }
|