When designing an embedded browser instance, the following features are typically considered:
The following structure depicts the internal architecture of the embedded browser.
Figure 1. The HTML component architecture
JWebPane component provides basic web page browsing functionality. It renders web pages and provides basic user interaction, such as navigating links, and submitting HTML forms. The
JWebPane component displays one web page at a time. The
PolicyDelegate is intended for implementing a browser policy. Implementations may use arbitrary logic to enable or reject sensitive operations such as loading web pages, opening new browser windows or running scripts on pages. An implementation may thus act as a list-based URL filter or a popup blocker. A single
PolicyDelegate may be associated with a
JWebPane object. It then receives notifications from the
JWebPane about changes to the browser state that are about to happen. The
PolicyDelegate may either accept or reject these changes. The
LoadStateListener tracks the state of a page load.
At the moment the project is 70% complete. The
JWebPane component implemented as a lightweight component extending the
JComponent class, which enables easy embedding into an application UI context. Moreover, the
JWebPane component may contain several web frames with the specified icon, title, and URL. The following browsing features are available:
Figure 2. The HTML component embedded into the JavaFX application
Click the image to view it at its natural size.
The following new features are scheduled to be implemented by August'08:
JWebPanecomponent in the Artem Ananiev's Blog.
-- Alla Redko