RFR: 8274137: TableView scrollbar/header misaligned when reloading data [v2]

Kevin Rushforth kcr at openjdk.java.net
Fri Sep 24 11:31:56 UTC 2021

On Fri, 24 Sep 2021 06:28:30 GMT, Robert Lichtenberger <rlichten at openjdk.org> wrote:

>> This PR fixes JDK-8274137 by removing the optimization from updateHbar() that will no-op the method in case the VirtualFlow is invisible or currently has no scene.
>> Since changes to the hBar's value can happen even if the VirtualFlow is not currently visible, the synchronisation between hBar and clipX must happen all the time.
>> A test agains VirtualFlow has been added that will fail before the change and pass afterwards.
> Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision:
>   8274137: TableView scrollbar/header misaligned when reloading data
>   Alternative fix using additional listeners instead of removing
>   optimization.

The fix and test look good. I left one comment about some unrelated changes. I still need to test this, but will do so soon.

modules/javafx.controls/src/main/java/javafx/scene/control/skin/VirtualFlow.java line 3194:

> 3192:         }
> 3193: 
> 3194:         @Override

The added `@Override` annotations are unrelated to your fix. Can you please revert them?


PR: https://git.openjdk.java.net/jfx/pull/629

More information about the openjfx-dev mailing list