On Tue, 5 Mar 2024 14:16:59 GMT, Nir Lisker <nlis...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains three additional 
>> commits since the last revision:
>> 
>>  - review comments
>>  - Merge remote-tracking branch 'origin/master' into 8092102.truncated
>>  - 8092102 Labeled: truncated property
>
> modules/javafx.controls/src/main/java/javafx/scene/control/Labeled.java line 
> 850:
> 
>> 848:                 protected boolean computeValue() {
>> 849:                     if (isWrapText()) {
>> 850:                         return false;
> 
> Are you sure that allowing text to wrap necessarily means it won't be 
> truncated? What if the max height doesn't allow another line?

Good point.  So the label will have its text truncated (by inserting the 
ellipsis string) when wrapText is on and the size is constrained by setting 
maxHeight.

Interestingly, it will not truncate the text (again, ellipsis string) if the 
label is resized by the layout:

![Screenshot 2024-03-05 at 12 54 
14](https://github.com/openjdk/jfx/assets/107069028/1ae47317-2d54-4bcd-942d-1a49ff9faeab)

Using the latest MonkeyTester to test
https://github.com/andy-goryachev-oracle/MonkeyTest
uncomment the listener in LabelPage

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

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

Reply via email to