Java Doc for IWorkbenchBrowserSupport.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » browser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.browser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.browser.IWorkbenchBrowserSupport

All known Subclasses:   org.eclipse.ui.browser.AbstractWorkbenchBrowserSupport,
IWorkbenchBrowserSupport
public interface IWorkbenchBrowserSupport (Code)
Web browser support. This class allows you to open URLs using internal or external Web browsers. Implementers may provide varying levels of support. The most rudimentary support that must be provided is to open URLs in an external web browser window. Everything else is a hint that browser support implementation may choose to honor but is not required (although a good implementation should aspire to support all the styles if possible on the given platform).

The support has a two-phase approach to opening URLs. A browser instance is created first, then openURL is called on it. This provides for browser instance reuse for as long as needed. The step of creating the browser instance encourages reuse itself by not creating new instances of browsers if one with the same id is already open. It also makes it possible to reuse browser instances restored after workbench is restarted.

The simplest way to open a URL is:

 IWorkbenchSupport.createBrowser("myId").openURL(url);
 

The call above will show the provided URL by reusing the browser instance with the matching id, or creating a new one if one does not exist already.

When more advanced control over the behavior of a browser instance is required, it is recommended to create the instance first, then reuse it as needed.

This interface is not intended to be implemented by clients.
See Also:   IWebBrowser
since:
   3.1



Field Summary
 intAS_EDITOR
     Style constant (value 1<<5) indicating that the internal web browser will be hosted in a workbench editor area.
 intAS_EXTERNAL
     Style constant (value 1<<7) indicating that the external web browser must be used even if the implementation supports internal browsers and the user didn't set the preference to external browsers.
 intAS_VIEW
     Style constant (value 1<<6) indicating that the internal web browser will be hosted in a workbench view.
 intLOCATION_BAR
     Style parameter (value 1<<1) indicating that the address combo and 'Go' button will created for the browser.
 intNAVIGATION_BAR
     Style parameter (value 1<<2) indicating that the navigation bar for navigating web pages will be created for the web browser.
 intPERSISTENT
     Style constant (value 1<<4) indicating that the internal web browser will reopen after restarting the workbench (if used).
 intSTATUS
     Style constant (value 1<<3) indicating that status will be tracked and shown for the browser (page loading progress, text messages etc.).


Method Summary
 IWebBrowsercreateBrowser(int style, String browserId, String name, String tooltip)
     Creates the new web browser instance.
 IWebBrowsercreateBrowser(String browserId)
     Creates the new web browser instance.
 IWebBrowsergetExternalBrowser()
     Returns a shared instance of the external web browser.
 booleanisInternalWebBrowserAvailable()
     Tests whether web browser as an SWT widget can be created in this workbench instance.

Field Detail
AS_EDITOR
int AS_EDITOR(Code)
Style constant (value 1<<5) indicating that the internal web browser will be hosted in a workbench editor area. This is just a hint - implementers of the browser support may not honor it.



AS_EXTERNAL
int AS_EXTERNAL(Code)
Style constant (value 1<<7) indicating that the external web browser must be used even if the implementation supports internal browsers and the user didn't set the preference to external browsers.



AS_VIEW
int AS_VIEW(Code)
Style constant (value 1<<6) indicating that the internal web browser will be hosted in a workbench view. This is just a hint - implementers of the browser support may not honor it.



LOCATION_BAR
int LOCATION_BAR(Code)
Style parameter (value 1<<1) indicating that the address combo and 'Go' button will created for the browser. This style is ignored if the support is forced to open the browser as external.



NAVIGATION_BAR
int NAVIGATION_BAR(Code)
Style parameter (value 1<<2) indicating that the navigation bar for navigating web pages will be created for the web browser. This style is ignored if the support is forced to open the browser as external.



PERSISTENT
int PERSISTENT(Code)
Style constant (value 1<<4) indicating that the internal web browser will reopen after restarting the workbench (if used). In addition, the URLs will appear in the MRU list.



STATUS
int STATUS(Code)
Style constant (value 1<<3) indicating that status will be tracked and shown for the browser (page loading progress, text messages etc.).





Method Detail
createBrowser
IWebBrowser createBrowser(int style, String browserId, String name, String tooltip) throws PartInitException(Code)
Creates the new web browser instance. If the user has chosen to use the internal Web browser, the given style bits (see class header for values) will be used to open the browser.

The method will reuse an existing browser instance if the same browserId value is passed to it. A persisted browser instance restored upon startup can be accessed this way. If null is passed as a browserId, a unique id will be generated each time method is called.

If the user has chosen not to use the internal browser or it is not available on the current platform, an external browser will be used and all style parameters will be ignored.


Parameters:
  style - the style display constants. Style constants should bebitwise-ORed together.
Parameters:
  browserId - if an instance of a browser with the same id is alreadyopened, it will be returned instead of creating a new one.Passing null will create a new instance with agenerated id every time.
Parameters:
  name - a name used for the presentation of the internal browser
Parameters:
  tooltip - a tooltip used for the presentation of the internal browser the browser instance that can be used to open the URL. Clientsintending to reuse the instance for all the URLs should cache theinstance and call IWebBrowser#openURL() on it. Clients areresponsible for closing the browser instance when not needed.
exception:
  PartInitException - if the operation failed for some reason



createBrowser
IWebBrowser createBrowser(String browserId) throws PartInitException(Code)
Creates the new web browser instance. This is a simplified method that creates the instance using default values for style, name and tooltip parameters. The method can be used to quickly open the URL by calling createBrowser(id).openURL(url).


Parameters:
  browserId - if an instance of a browser with the same id is alreadyopened, it will be returned instead of creating a new one.Passing null will create a new instance with agenerated id every time. the browser instance that can be used to open the URL. Clientsintending to reuse the instance for all the URLs should cache theinstance and call IWebBrowser#openURL() on it. Clients areresponsible for closing the browser instance when not needed.
exception:
  PartInitException - if the operation failed for some reason




getExternalBrowser
IWebBrowser getExternalBrowser() throws PartInitException(Code)
Returns a shared instance of the external web browser. Clients can use it to share one external browser. The external browser that will be used is subject to browser support implementation. A suggested implementation is to use the operating system's default browser. Implementations that offer users a choice of the web browser should honour the users choice of external browser, with the initial selection being the system default browser. the shared instance of the external browser
exception:
  PartInitException - if the operation failed for some reason



isInternalWebBrowserAvailable
boolean isInternalWebBrowserAvailable()(Code)
Tests whether web browser as an SWT widget can be created in this workbench instance. If this method returns false, createBrowser would ignore browser styles AS_EDITOR and AS_VIEW and always create an external browser. true if internal web browser can be created onthis platform, false otherwise.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.