4

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?

hotzen
  • 2,800
  • 1
  • 28
  • 42

1 Answers1

2

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

Vicente Reig
  • 877
  • 9
  • 14
  • 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 Jul 01 '10 at 17:43
  • 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_Changes Seems that Flying Saucer performs on every request all the calculations relative to the layout and element's position. Hope it helps. :) – Vicente Reig Jul 01 '10 at 18:10