High performance text component

Richard Bair richard.bair at oracle.com
Thu Aug 30 15:16:39 PDT 2012

>> Extending region to get CSS is a good thing, but Region has width / height and is resizable. We could move CSS support up to Parent, or make sense of DIV having a specific width and height (width is useful because we then wouldn't need "wrappingWidth" -- ie, they are the same thing, and it would be resizable so adding it to a layout container would perfect. But what to do about the height? If the height isn't right, do we just flow the text beyond the given height? Kind of a weird case). Or we can add CSS Background / Border support to TextFlow independent of the Region.
> I thought about this a little bit yesterday, if we choose to make Div a subclass of Region we would probably remove setWrappingWidth(double) and add:
> setWrapMode (none | word | character) or use CSS names (word-break, word-wrap).
> As for the relationship between the width and height, the way I thought, if word wrap is requested then content bias is set to horizontal, otherwise is null.
> Does that make any sense ?
> as I said,  I didn't think about this very much…

But what should we do if the region's width/height is set so small that we can't show all the text. Do we clip, or let it run over?


More information about the openjfx-dev mailing list