On Mon, 29 Nov 2021 16:55:16 GMT, Jeanette Winzenburg <faste...@openjdk.org> 
wrote:

>> 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.
>
> good catch! the "additional" stuff typically is done in the properties' 
> invalidated ..

Exactly. This ensures consistent behavior regardless of how a property value is 
set.

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

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

Reply via email to