KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > browser > IWebBrowser


1 /*******************************************************************************
2  * Copyright (c) 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.ui.browser;
12
13 import java.net.URL JavaDoc;
14
15 import org.eclipse.ui.PartInitException;
16
17 /**
18  * An opened Web browser instance (either internal or external).
19  * <p>
20  * This interface is not intended to be implemented by clients.
21  * </p>
22  *
23  * @since 3.1
24  * @see IWorkbenchBrowserSupport
25  */

26
27 public interface IWebBrowser {
28     /**
29      * Returns the unique identifier of this browser. If an id has been supplied
30      * to the browser support when the instance was created, it will be used.
31      * Otherwise, a generated id will be provided to the browser that is
32      * guaranteed to be unique.
33      *
34      * @return a unique identifier of this browser instance
35      */

36     String JavaDoc getId();
37
38     /**
39      * Opens a URL on this Web browser instance.
40      *
41      * @param url
42      * the URL to display
43      * @exception PartInitException
44      * if the browser fails to navigate to the provided url for
45      * any reason
46      */

47     void openURL(URL JavaDoc url) throws PartInitException;
48
49     /**
50      * Closes this browser instance.
51      *
52      * @return <code>true</code> if the browser was closed or
53      * <code>false</code> if the operation failed or is not supported.
54      */

55     boolean close();
56
57 }
58
Popular Tags