01: /*******************************************************************************
02: * Copyright (c) 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.browser;
11:
12: import java.net.URL;
13:
14: import org.eclipse.ui.PartInitException;
15:
16: /**
17: * An opened Web browser instance (either internal or external).
18: * <p>
19: * This interface is not intended to be implemented by clients.
20: * </p>
21: *
22: * @since 3.1
23: * @see IWorkbenchBrowserSupport
24: */
25:
26: public interface IWebBrowser {
27: /**
28: * Returns the unique identifier of this browser. If an id has been supplied
29: * to the browser support when the instance was created, it will be used.
30: * Otherwise, a generated id will be provided to the browser that is
31: * guaranteed to be unique.
32: *
33: * @return a unique identifier of this browser instance
34: */
35: String getId();
36:
37: /**
38: * Opens a URL on this Web browser instance.
39: *
40: * @param url
41: * the URL to display
42: * @exception PartInitException
43: * if the browser fails to navigate to the provided url for
44: * any reason
45: */
46: void openURL(URL url) throws PartInitException;
47:
48: /**
49: * Closes this browser instance.
50: *
51: * @return <code>true</code> if the browser was closed or
52: * <code>false</code> if the operation failed or is not supported.
53: */
54: boolean close();
55:
56: }
|