views:

63

answers:

1

My program generates results concurrently. I want to append each result, as soon as it enters the swing-thread, to a pane which shall render the result's html-fragment like:

<ol class="result-type-a"><li class="foo-result"><html-output-of-result .../></li></ol>

Is the JTextPane the right component?

Are there problems with my "streaming-nature" of displaying the information; e.g. the output will be generated step by step, as soon as new results come in, which could require a full parse-and-render each time.

Is there some full fledged HTML rendering component in Java (CSS!!) ? Or any other way to display Information in a structured, easily formatted way like HTML+CSS provides?

+2  A: 

I never had the chance to try it, but seems that XHTMLRenderer may be useful to you.

Vicente Reig
Very nice, thank you. Any idea what they mean by screen media in "No support for incremental layout (applies to screen media only)."?https://xhtmlrenderer.dev.java.net/feature-list.html
hotzen
Well, I've never heard about that, as long as I've never been involved in a browser-like project, but at Mozilla project seems to be a nice explanation: https://wiki.mozilla.org/Gecko:Reflow_Refactoring#Incremental_layout_ChangesSeems that Flying Saucer performs on every request all the calculations relative to the layout and element's position.Hope it helps. :)
Vicente Reig