This is set of classes that extends Java's default HTML Swing renderer to support newer CSS features (discussed below).
This doesn't fully support any particular CSS version, so this is not intended to be used for arbitrary pages. The intended usage for these classes is to present HTML that you have complete control over, such as a set of help pages.
Installing this architecture is simple:
JEditorPane textPane = new JEditorPane(); HTMLEditorKit kit = new QHTMLEditorKit(); textPane.setEditorKit(kit);
This extends Swing's existing HTMLEditorKit
to support newer CSS features.
Swing has included HTML support for decades, but it has been conspicuously limited (and therefore dated). The QHTMLEditorKit
is an attempt to spruce up the appearance of the HTML without completely reinventing the rendering engine.
Other resources you might want to consider include:
Below is a (approximate) set of features the QHTML classes support:
Also these classes support base64-encoding of our custom JVG file format, which is used in some of the help documentation in the showcase app to embed vector graphics.