RFR: 8087673: [TableView] TableView and TreeTableView menu button overlaps columns when using a constrained resize policy.
Jose Pereda
jpereda at openjdk.org
Mon Aug 29 11:45:33 UTC 2022
The corner region is currently laid out with this assumption:
// position the top-right rectangle (which sits above the scrollbar)
However, the vertical scrollbar is not always visible. Therefore, when that is the case, the corner region is laid out on top of the table column headers, overlapping any of their graphic or text content. In case of the last visible column header, it is not always possible to scroll horizontally to see the full content, either because of a constrained resize policy or because there is no more space left after the last column.
This PR fixes this issue by considering as padding for the last visible column header the presence of the corner region over it, only when the vertical scrollbar is not visible and the corner region is.
A couple of tests have been added to both TableViewTest and TreeTableViewTest.
Test 1: Before and after the changes :
<img width="312" alt="image" src="https://user-images.githubusercontent.com/2043230/187190928-efc29e38-8de2-4daf-8eff-a218d6fae181.png">
<img width="312" alt="image" src="https://user-images.githubusercontent.com/2043230/187190991-deaa88b3-2f52-48bc-b3ec-107a5151f7b5.png">
Test 2: Before (sort arrow is there, but not visible) and after the changes:
<img width="412" alt="image" src="https://user-images.githubusercontent.com/2043230/187191310-fb348d8c-84fc-4254-a1a5-91811bf09b79.png">
<img width="412" alt="image" src="https://user-images.githubusercontent.com/2043230/187191358-0d4937cb-b3b4-4530-9489-ff8cbf0c8443.png">
-------------
Commit messages:
- Include as padding the corner region over the last visible column header
Changes: https://git.openjdk.org/jfx/pull/886/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=886&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8087673
Stats: 238 lines in 4 files changed: 230 ins; 2 del; 6 mod
Patch: https://git.openjdk.org/jfx/pull/886.diff
Fetch: git fetch https://git.openjdk.org/jfx pull/886/head:pull/886
PR: https://git.openjdk.org/jfx/pull/886
More information about the openjfx-dev
mailing list