RFR: 8258777: SkinBase: add api to un-/register invalidation-/listChange listeners [v7]

Nir Lisker nlisker at openjdk.java.net
Wed Apr 7 13:14:19 UTC 2021


On Wed, 7 Apr 2021 11:06:53 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Changes in Lambda..Handler:
>> - added api and implemenation to support invalidation and listChange listeners in the same way as changeListeners
>> - added java doc 
>> - added tests
>> 
>> Changes in SkinBase
>> - added api (and implementation delegating to the handler)
>> - copied java doc from the change listener un/register methods 
>> - added tests to verify that the new (and old) api is indeed delegating to the handler
>> 
>> Note that the null handling is slightly extended: all methods now can handle both null consumers (as before) and null observables (new) - this allows simplified code on rewiring "path" properties (see reference example in the issue)
>
> Jeanette Winzenburg has updated the pull request incrementally with one additional commit since the last revision:
> 
>   updated doc of list/Change methods that of invalidation methods

modules/javafx.controls/src/main/java/javafx/scene/control/SkinBase.java line 221:

> 219:      *  may be {@code null}
> 220:      */
> 221:     protected final void registerChangeListener(ObservableValue<?> property, Consumer<ObservableValue<?>> operation) {

Maybe instead of `property` use `observable` like with the invalidation methods to not confuse it with the `Property` interface.

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

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


More information about the openjfx-dev mailing list