KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > browser > OpenWindowListener


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 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 package org.eclipse.swt.browser;
12
13 import org.eclipse.swt.internal.SWTEventListener;
14
15 /**
16  * This listener interface may be implemented in order to receive
17  * a {@link WindowEvent} notification when a new {@link Browser}
18  * needs to be provided by the application.
19  *
20  * @see Browser#addOpenWindowListener(OpenWindowListener)
21  * @see Browser#removeOpenWindowListener(OpenWindowListener)
22  * @see CloseWindowListener
23  * @see VisibilityWindowListener
24  *
25  * @since 3.0
26  */

27 public interface OpenWindowListener extends SWTEventListener {
28
29 /**
30  * This method is called when a new window needs to be created.
31  * <p>
32  * A particular <code>Browser</code> can be passed to the event.browser
33  * field to host the content of a new window.
34  * <p>
35  * A standalone system browser is used to host the new window
36  * if the event.required field value is false and if the event.browser
37  * field is left <code>null</code>. The event.required field
38  * is true on platforms that don't support a standalone system browser for
39  * new window requests.
40  * <p>
41  * The navigation is cancelled if the event.required field is set to
42  * true and the event.browser field is left <code>null</code>.
43  * <p>
44  * <p>The following fields in the <code>WindowEvent</code> apply:
45  * <ul>
46  * <li>(in/out) required true if the platform requires the user to provide a
47  * <code>Browser</code> to handle the new window or false otherwise.
48  * <li>(out) browser the new <code>Browser</code> that will host the
49  * content of the new window.
50  * <li>(in) widget the <code>Browser</code> that is requesting to open a
51  * new window
52  * </ul>
53  *
54  * @param event the <code>WindowEvent</code> that needs to be passed a new
55  * <code>Browser</code> to handle the new window request
56  *
57  * @since 3.0
58  */

59 public void open(WindowEvent event);
60 }
61
Popular Tags