RFR: 8092102: Labeled: truncated property [v14]

Kevin Rushforth kcr at openjdk.org
Mon May 6 15:01:00 UTC 2024


On Mon, 6 May 2024 14:50:00 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java line 221:
>> 
>>> 219:         OverrunStyle type,
>>> 220:         String ellipsisString,
>>> 221:         AtomicBoolean textTruncated
>> 
>> I recommend setting `textTruncated` to false as the first statement (alternatively, add a comment that the caller is expected to initialize it to false).
>
> setting to false would be incorrect in the case of multi-line text.
> 
> I can add a comment, though it's not a public API and there was no comment/javadoc before.

Yes, I see. In that case, it's up to you whether to add a simple comment that this should be initialized by the caller (but maybe it doesn't need to be mentioned?)

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1389#discussion_r1591138400


More information about the openjfx-dev mailing list