RFR: 8092102: Labeled: textTruncated property [v15]
Andy Goryachev
angorya at openjdk.org
Tue May 7 14:41:00 UTC 2024
On Tue, 7 May 2024 09:02:49 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> comments
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java line 236:
>
>> 234: OverrunStyle type,
>> 235: String ellipsisString,
>> 236: AtomicBoolean textTruncated
>
> Instead of returning the clipped text with the return value, and the truncation flag with an argument, have you considered just using a record to return both at the same time? That would be a cleaner solution.
Not really a cleaner solution: `computeClippedWrappedText()` might get called multiple times (for each line of text), and doing an extra allocation per call is less optimal than passing a reference to an AtomicBoolean.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1389#discussion_r1592604175
More information about the openjfx-dev
mailing list