]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/browser/LocationEvent.java
Remove invalid SHA-256-Digests
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / browser / LocationEvent.java
1 /*******************************************************************************
2  * Copyright (c) 2003, 2012 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.browser;
15
16 import org.eclipse.swt.events.*;
17 import org.eclipse.swt.widgets.*;
18
19 /**
20  * A <code>LocationEvent</code> is sent by a {@link Browser} to
21  * {@link LocationListener}'s when the <code>Browser</code>
22  * navigates to a different URL. This notification typically
23  * occurs when the application navigates to a new location with
24  * {@link Browser#setUrl(String)} or when the user activates a
25  * hyperlink.
26  *
27  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
28  *
29  * @since 3.0
30  */
31 public class LocationEvent extends TypedEvent {
32         /**
33          * The URL of this event, escaped and encoded for consumption by
34          * {@link java.net.URI#URI(String)}.
35          */
36         public String location;
37
38         /**
39          * A flag indicating whether the location opens in the top frame
40          * or not.
41          */
42         public boolean top;
43
44         /**
45          * A flag indicating whether the location loading should be allowed.
46          * Setting this field to <code>false</code> will cancel the operation.
47          */
48         public boolean doit;
49
50         static final long serialVersionUID = 3906644198244299574L;
51
52 /**
53  * Constructs a new instance of this class.
54  *
55  * @param widget the widget that fired the event
56  *
57  * @since 3.5
58  */
59 public LocationEvent(Widget widget) {
60         super(widget);
61 }
62
63 /**
64  * Returns a string containing a concise, human-readable
65  * description of the receiver.
66  *
67  * @return a string representation of the event
68  */
69 @Override
70 public String toString() {
71         String string = super.toString ();
72         return string.substring (0, string.length() - 1) // remove trailing '}'
73                 + " location=" + location
74                 + " top=" + top
75                 + " doit=" + doit
76                 + "}";
77 }
78 }