High performance text component
zonski at gmail.com
Wed Sep 5 06:55:42 PDT 2012
On 05/09/2012, at 4:34 AM, Felipe Heidrich <felipe.heidrich at oracle.com> wrote:
>> Felipe, we should update the documents on the WIKI to refer to the "Rich Text API" instead of DOM API because I fear this can get confusing! Other than those of us internally who have argued for / against the Attributed String style vs. the DOM style, most people probably won't get the subtlety, having missed the context.
> Should I rename Div to Paragraph, Span to Text ?
We already have 'Text'. Is this different or could we reuse what's already there.
Just checking: the 'Paragraph' isn't just a FlowPane with special support for line wrapping text is it? I.e FlowPane.setWordWrapEnabled(true).
>> So as you can see, the "document object model" here is just the scene graph (there are many DOMs in the world, Bilbo, and none of them should be used lightly!).
>> The Paragraph node is just a very specialized layout container, which knows how to layout text nodes properly. Felipe, can you add a sample of complex text and show how that works?
> Sure, https://wikis.oracle.com/display/OpenJDK/Rich+Text+API+Samples#RichTextAPISamples-Sample6BidiText
I feel like the word wrapping text+embedded objects is the big thing here, otherwise it's just a flow layout right? I don't really get an immediate sense of what this is all about from those samples. Most of those screenshots could be achieved without a new paragraph tag I think.
Perhaps it would be good to see examples of wrapping in this docco - basically a 'page' of text with a couple of paragraphs with some markup in each (span, hyperlinks), and some images. Maybe screen shots of the same screen in different sizes so wrapping is clearly visible.
I do think it would be good to control the way text wraps around embedded objects (eg images) from the get go and demos of that would then be great.
What about the other markup bread-and-butter tags: ul, li, blockquote. Are these on the list for consideration? Some way of doing this (eg additional Nodes for these) would seem useful.
More information about the openjfx-dev