[jsword-devel] display methods
Joe Walker
jsword-devel@crosswire.org
Tue, 16 Mar 2004 20:09:20 +0000
So JEditorPane in JDK1.4 makes a fairly lousy HTML renderer. I've been
weighing up some alternatives.
The requirements are, it must:
- work using XML input
- be easily understood for the developer (which fairly much means HTML)
- work over webstart
- be freely re-distributable
- allow some DHTML like flexibility
Some of those are tough requirements, but here's what I've come up with.
JEditorPane in JDK1.4:
does not do JavaScript or CSS level anything
JEditorPane in JDK1.5:
big improvement - does CSS, but not JavaScript. Not released for
another 6 months?
JRex (Embed Mozilla)
very good html displayer, but probably very complex to get working
and installed, especially over WebStart. JNI+webstart anyone? see
http://jrex.mozdev.org/index.html
Jazilla (Mozilla re-write in Java)
Interesting project, but one that seems more interested in XUL than
the Java renderer, proceeding slowly. see
http://jazilla.mcbridematt.sniperhq.net/
JXWB (OSS Java Browser)
Commercial software made free. Works well with Swing (includes
customized implementations of javax.swing.text.Document and
javax.swing.text.EditorKit) Things have moved on quite a bit recently.
See http://sourceforge.net/projects/jxwb
IceBrowser
Not free but otherwise excellent solution supporting all major web
standards. See http://www.icesoft.com/products/icebrowser.html
SWT Browser Component
Don't think we could easily embed an SWT component in swing (since
SWT is heavyweight in AWT speak) and I don't particularly want to
re-write the whole app in SWT. However there are 2 projects to allow use
of SWT from a swing API. SwingWT is a swing-like proxy to SWT
(http://swingwt.sourceforge.net/) and MasterCL
(http://chrriis.brainlex.com/projects/mastercl/) will allow you to
dynamically swap package names to make the whole of swing use SWT
dynamically.
It is possible to use SWT from webstart - irate radio do it
(http://irate.sf.net/) although their build scripts are not very helpful.
FOP -> PNG
FOP is XSL:FO renderer (http://xml.apache.org/fop/index.html) that
can create PDFs and various graphics files. Could give very slick
output, but no DHTML, quite slow and FO is not easy to use. Probably
not one of the best ideas.
Dynamic Swing GUI
There are plenty of XML->Swing converters. JDK 1.4 even includes
one. Maybe we could write a OSIS->SwingXML converter in XSL and then
render OSIS text in swing components. Could be very fancy. XSL could be
complex.
Does anyone have any experience in any of these, or any alternative
solutions?
I'm thinking it would be good to have a pluggable system, but I'm not
sure which of these to turn to first. I'm thinking (in order) JXWB,
Dynamic Swing GUI, SwingWT, JRex at the moment.
Thanks.
Joe.