+1 from me. I think this is a good addition.
The biggest use case I see is that you can now easily write code to install a tooltip when the text is truncated.
Also since the property is created lazily, there is no downside for Labeled nodes that do not need this feature.
 
- Marius
 
 
Gesendet: Dienstag, 05. März 2024 um 22:15 Uhr
Von: "Andy Goryachev" <andy.goryac...@oracle.com>
An: "openjfx-dev@openjdk.org" <openjfx-dev@openjdk.org>
Betreff: Q: Labeled.textTruncated Property (RFE)

Dear colleagues:

 

Do you think a new property, ReadOnlyBooleanProperty textTruncated, should be added to the Labeled control?

 

 

On one hand, we do have a couple of tickets in JBS requesting that:

 

  • JDK-8091891 TreeView: There is no tooltip available on truncated node
  • JDK-8205211 Ability to show Tooltip only when text is shown with ellipsis (...)

 

On the other hand, this functionality can in theory be implemented at the application level, although the number of changes required might be uncomfortably large in the case of Tree/TreeTable/TableView.

 

JBS:

 

Pull Request: https://github.com/openjdk/jfx/pull/1389

 

What do you think?

 

-andy

Reply via email to