RFR: 8375444: MenuButton - textTruncated Property is always false [v3]
Michael Strauß
mstrauss at openjdk.org
Sat Jan 17 18:13:07 UTC 2026
On Thu, 15 Jan 2026 21:02:04 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
>> For MenuButton and SplitMenuButton the textTruncated Property is always false - but the text is correctly rendered truncated if it is to long.
>>
>> This PR fixes it, by extending the logic in LabeledImpl - to always forward this property.
>> I've also extended the existing tests for the truncated property.
>>
>> It would be great, to get some feedback on how i fixes the bug.
>
> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>
> JDK-8375444
> Removed unnecessary newline
modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LabeledImpl.java line 110:
> 108: //System.out.println("Text Model");
> 109: labeledImpl.setText(labeled.getText());
> 110: //System.out.println(" is truncated: " + labeled.isTextTruncated());
Please remove all of the commented-out code here.
modules/javafx.controls/src/test/java/test/javafx/scene/control/LabeledTruncatedTest.java line 49:
> 47: import java.util.function.Supplier;
> 48:
> 49: import javafx.stage.Stage;
I know that we don't specify import order, but keeping similar imports grouped is easier on the eyes...
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2701328458
PR Review Comment: https://git.openjdk.org/jfx/pull/2040#discussion_r2701329404
More information about the openjfx-dev
mailing list