RFR: 8092102: Labeled: truncated property [v2]
Andy Goryachev
angorya at openjdk.org
Tue Mar 5 21:04:01 UTC 2024
> Adds **Labeled.textTruncated** property which indicates when the text is visually truncated (and the ellipsis string is inserted) in order to fit the available width.
>
> The new property reacts to changes in the following properties:
> - ellipsisString
> - font
> - height
> - text
> - width
> - wrapText
>
> I don't think it's worth creating a headful test (headless won't work) due to relative simplicity of the code.
>
> **Alternative**
>
> The desired functionality can be just as easily achieved on an application level, by adding a similar property to a subclass. What is the benefit of adding this functionality to the core?
>
> **See Also**
>
> * [JDK-8091891](https://bugs.openjdk.org/browse/JDK-8091891) TreeView: There is no tooltip available on truncated node
> * [JDK-8205211](https://bugs.openjdk.org/browse/JDK-8205211) Ability to show Tooltip only when text is shown with ellipsis (...)
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
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/1389/files
- new: https://git.openjdk.org/jfx/pull/1389/files/7cbd46c7..8a5cb17e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=1389&range=01
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=1389&range=00-01
Stats: 1319 lines in 36 files changed: 1172 ins; 79 del; 68 mod
Patch: https://git.openjdk.org/jfx/pull/1389.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1389/head:pull/1389
PR: https://git.openjdk.org/jfx/pull/1389
More information about the openjfx-dev
mailing list