RFR: 8276553: ListView scrollTo() is broken after fix for JDK-8089589

Michael Strauß mstrauss at openjdk.java.net
Mon Nov 29 14:41:14 UTC 2021


On Mon, 29 Nov 2021 11:56:45 GMT, Johan Vos <jvos at openjdk.org> wrote:

> After (re)setting the number of elements, make sure to do at least some estimation of the total size.
> Added a testcase for this scenario.

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

> 901:         recalculateAndImproveEstimatedSize(2);
> 902: 
> 903:         cellCount.set(value);

Can this be implemented in a way that doesn't violate the property contract? Since this property is public API, `setCellCount(int)` should just call `cellCountProperty().set(int)`. Maybe you can extract the composite operation here into a private method and use that instead of `setCellCount(int)`.

`position` has the same problem.

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

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


More information about the openjfx-dev mailing list