High performance text component
Felipe Heidrich
felipe.heidrich at oracle.com
Thu Aug 30 15:38:42 PDT 2012
Not sure,
CSS has the overflow property (visible | hidden | scroll) that specifies what would happen in this case.
Do we have this concept in JFX ?
What happen if I place a Rect(10, 10, 100, 100) in a Region that is (50, 50) ? it overflows right ?
Felipe
On Aug 30, 2012, at 3:16 PM, Richard Bair wrote:
>>> 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?
>
> Richard
More information about the openjfx-dev
mailing list