Search |
||
Using JWebPane: common scenariosPosted by ixmal on June 11, 2008 at 1:24 AM PDT
In the last blog posting I introduced a new component called JWebPane that renders HTML content in Java applications. Today I'd like to discuss the details of the practical use of this component. Let me start with typical use cases.
1. HTML RenderingSince the necessity of employing this component in GUI applications appeared a long time ago, each solution, even simple rendering of web pages, is greatly appreciated. Moreover, in spite of the fact that the importance of interactivity is rising steeply, the correct rendering of up-to-date web content still remains a crucial requirement for an HTML component. It's worth mentioning that JWebPane copes with this task successfully along with the help of WebKit, one of the most advanced web engines.2. Load event notificationsLet's move on to more interesting items. The load control of web pages and its resources is another highly demanded function required by many users. For this purpose JWebPane provides the following events: page loading start, external resource loading start, loading progress, loading stop or error, page loading finish, and resources loading finish. The exact set of events is not finalized yet, and new event types will appear soon.3. NavigationSometimes using the HTML component is limited to one document, however, the HTML format itself implies tie-up and cross linking of documents. Navigation control, such as Back, Forward, Get URL and other commands, is naturally provided by JWebPane. The navigation function is closely related to transfers from one page to another. This is quite a controversial point: on the one hand, the application should maintain the history, but on the other hand, the component possesses information about which web sites were visited during the current session. That's why JWebPane provides the basic tools for history maintenance as well as the ability to retrieve history from the application.4. ChromeI always wondered where did the "chrome" term come from :-) This term is used to specify the HTML component environment, which is usually a browser window. Chrome typically includes support of the following elements: status bar, window title and icon, tooltips, window size, the component itself, and others. JWebPane, as an HTML component, doesn't have built-in support of these controls, however, it provides an API to implement those in the application.5. What next?Undoubtedly, the list of the JWebPane features is incomplete. I'm going to tell you more about the coolest ones, for example, how to create new windows or how to work with JavaScript. Additionally, we would like developers that are ready to use JWebPane share their ideas and visions. After all, they indeed define what kind of features should the convenient and handy HTML component have. Don't they?»
Related Topics >>
Java Desktop Comments
Comments are listed in date ascending order (oldest first)
Submitted by pdoubleya on Wed, 2008-06-11 02:28.
Hi Artem--thanks for updating us on the web pane--a question is, how will you all manage synchronizing with updates to WebKit? The major renderers (IE, Opera, Gecko, WebKit) all get updated pretty often, certainly much more quickly than new Java versions are released. I would like to see us avoid the chaos that came with bundling a buggy XML parser in JDK 1.4, which then was a part of the "core" platform. I understand this will be an important component to many people, and they will want it as part of the core, but on the other hand I think we'd like to take advantage of updates to WebKit as they are released.
Thanks!
Patrick
Submitted by ixmal on Wed, 2008-06-11 02:30.
Well, Google Maps works pretty fine and smoothly inside JWebPane, as well as many other maps sites :)
Submitted by ixmal on Wed, 2008-06-11 02:35.
The release model of JWebPane component is not finalized yet. It is expected as a part of JavaFX SDK and (I guess) will be also available as a standalone Java library, with its own versions not related to JDK. Again, this is no more than my thoughts and assumptions
Submitted by jodeleit on Fri, 2009-06-12 08:16.
Will there an API to traverse (and modify) the DOM of loaded pages?
Submitted by anderruiz on Tue, 2008-06-17 15:15.
I'm a developer of Automatic Vending Machines written in Java and our user interfaces are Web based.
For many years we've been using JRex an mozilla based Java Wrapper but the development is discontinued. It will be great to replace it, with an officially supported Web rendering component like JWebPane. Key features for as are: - LiveConnect: Access from java to javascript - Java Plugin Access: To notify user actions to java through javascript By the way is there any place where I can download JWebPane to use it (without downloading the JRE o something like this)? is there any way to make it work with JRE 1.4?
Submitted by liquid on Wed, 2008-06-11 03:58.
i'd really like to test the integration possibilities. Can we embed swing components, Scenario scenes, decora effects, jmc media, etc inside the JWebPane, and vice versa (where applicable), what about flash, silverlight, etc etc...
I thought it would be nice for instance to have plugins such as greasekit working, or to know you'd be able to code userscripts in java, (or at least have the technical ability to reimplement such a plugin) and so on.
And also, with features added everyday to webkit, what is the version used in the jwebpane (for things like the squirrelfish js interpreter, html5 and css features, and so on), and what is the plan for future webkit improvements to be usable (or not) in JWebPane ?
You could see the jwebpane as a way to use html as a layout engine, css as a visual engine, and java (javascript to some extent) as the behavior layer for swing components and applications. with the added value that there are huge number of tools that can help you.
Submitted by fabriziogiudici on Wed, 2008-06-11 02:25.
For me, the first important use case will be, at last, to embed Google Maps in my application without breaking Google's terms of use :-)
Submitted by gath55 on Tue, 2008-07-15 07:18.
Hello again Artem
Here's one addition to my questions above (of which the answer to nr. 1 is what I'm most interested in):
As I understand it JWebPane will first be relased with JavaFX this fall. Will I be able to integrate that into my Swing code in some way? This might be a JavaFX question really, but it's so important to me to get a really good web browser functionality into my Swing project.
Thanks again.
Submitted by gath55 on Mon, 2008-07-14 01:19.
Hello Artem
Words cannot describe how exited I am for the upcoming JWebPane component.
I just have two questions and I realize you might not be able to answer the second one... :-)
1. Will the JWebPane support Flash. That is will I be able to play Flash videos inside it, like I can in other browsers?
2. Has there been published an estimate of a release date for this component?
Thanks !
Submitted by geovizer on Tue, 2008-07-22 11:59.
Artem and All,
I'm glad to hear that web mapping services render nicely inside JWebPane -- that's a key usage scenario for me as well.
But, I would like to be able to add other Swing components inside a JWebPane. Why? Well, to add controls into the application. Maybe this would be too confusing to the user, we all have web browsing habits pretty well ingrained now. But it opens up some exciting browser <--> local machine interaction possibilities. And, if you want to customize the browser without hacking WebKit directly, this could be a great thing.
My current application is called the GeoViz Toolkit (http://www.geovista.psu.edu/grants/cdcesda/software/), and it will be using JWebPane when it becomes available -- I'm looking forward to it!
regards,
-Frank
Submitted by pgmglv on Mon, 2008-06-16 17:51.
Artem,
First of all - let me say that JWebPane is extremely important development. That is if it is not confined to be just the HTML viewer for Swing. See how many innovative applications exist on Mac OS X just because WebView api was made available to developers. If the trend continues at this rate - many new desktop (and we hope mobile) applications will use Web UI instead of anything else :-) Our company (http://lablz.com) has built an open source Browser Bhoost around Android's WebView Java API. So we have first hand experience with WebKit wrapping in Java. Thus the questions:
Submitted by chrriis on Mon, 2008-06-16 04:56.
Submitted by geekycoder on Thu, 2008-06-19 09:50.
Hi Artem,
kudos to the talented engineers for developing a world-class HTML component. Looking at what you describe, JWebPane will be great addition to anyone building the next cool application.
One question I will like to ask if JWebPane supports drag and drop to other Swing component. For example, if the text and image select from JWebPane can be drag to other component like JTextField, JButton so text can trigger event upon dropping or image can be saved upon dropping on another button.
thx
Submitted by samkass on Wed, 2008-06-11 11:05.
I'm hoping that at some point HTML/CSS can take over some basic thick-client UI responsibilities. I'm imagining wizards, forms, and similar UI elements being coded in HTML/CSS, delivered and installed with the application, and rendered locally using JWebPane. The results from the forms would be locally processed without a web server. I think that would be pretty compelling...
Submitted by ixmal on Mon, 2008-06-16 06:29.
I missed the blog for several days, and it seems there are many interesting suggestions here :) Let me try to comment/answer some:
Submitted by aberrant on Thu, 2008-06-12 13:08.
Submitted by aberrant on Thu, 2008-06-12 09:57.
I really like the idea of JWebPane. Here are some things I would like to be able to do.
Submitted by watsoncj on Thu, 2008-06-19 17:58.
Exciting! I'm looking forward to trying it out once its released.
Submitted by will69 on Wed, 2008-06-18 15:55.
I would like to see GUI construction via SVG, like KDE does. Looks great (try KDE4 games!), makes GUIs scalable and there's lots of established tools. Is that a planned use case?
Submitted by geovizer on Fri, 2008-09-19 10:53.
My impression is that JWebPane will be released as part of JavaFX. Is that right? I was disappointed to see that it was not part of the beta release of JavaFX.
Submitted by rufwork on Sat, 2008-09-06 20:25.
Seriously, when's the next update on JWebPane's progress? This really would be The Right Way to create an html widget, but announcing it, even informally, and then having it go underground for so long is building a heck of bad impression.
What's up?
Submitted by ixmal on Mon, 2008-09-29 01:34.
Sorry for a significant delay with answer. JavaFX 1.0 release is of very high priority for Sun, and we do our best to release it is the best quality. Unfortunately, JWebPane component is not as stable now, so it will not be a part of 1.0 Uur current plans are to open JWebPane right after 1.0 is released, roughly in a couple of months.
Submitted by ixmal on Mon, 2008-09-29 01:37.
Good news is that this delay allows JWebPane team to spend some time on plugins support. Watch for updates
Submitted by omniteo790 on Thu, 2008-10-30 03:46.
Hello...is thera a news for JWebPane component?...
When can I try this component?
Submitted by dlemmermann on Fri, 2009-03-20 14:48.
Please, please, please, I need this component urgently for my rich client app. When will it be released? This is ridiculous.
Submitted by geovizer on Tue, 2009-03-31 15:11.
Artem and All,
Any updates to the status JWebPane would be appreciated.
regards,
-Frank
Submitted by dmdevito on Mon, 2009-04-13 01:27.
Sooner JWebPane will be released, better it would be.
JWebPane will be an important component for Java, and a good news for SUN.
If you like, read my detailled arguments here: http://www.jroller.com/dmdevito/entry/hotjava_may_come_back_due
|
||
|
|