RFR: 8258777: SkinBase: add api to un-/register invalidation-/listChange listeners [v2]
Nir Lisker
nlisker at openjdk.java.net
Thu Mar 25 13:55:30 UTC 2021
On Thu, 25 Mar 2021 13:29:44 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> Can you list the other affected methods?
>
>>
>>
>> Can you list the other affected methods?
>
> at line 211 (in the changed skinBase)
>
> /**
> * Subclasses can invoke this method to register that they want to listen to
> * property change events for the given property. Registered {@link Consumer} instances
> * will be executed in the order in which they are registered.
> * @param property the property
> * @param consumer the consumer
> */
> protected final void registerChangeListener(ObservableValue<?> property, Consumer<ObservableValue<?>> consumer) {
>
>
>
> and at line 255
>
> /**
> * Unregisters all change listeners that have been registered using {@link #registerChangeListener(ObservableValue, Consumer)}
> * for the given property. The end result is that the given property is no longer observed by any of the change
> * listeners, but it may still have additional listeners registered on it through means outside of
> * {@link #registerChangeListener(ObservableValue, Consumer)}.
> *
> * @param property The property for which all listeners should be removed.
> * @return A single chained {@link Consumer} consisting of all {@link Consumer consumers} registered through
> * {@link #registerChangeListener(ObservableValue, Consumer)}. If no consumers have been registered on this
> * property, null will be returned.
> * @since 9
> */
> protected final Consumer<ObservableValue<?>> unregisterChangeListeners(ObservableValue<?> property) {
I see. I recommend that they be improved in this PR. I don't know if this will need to be part of the CSR, though.
-------------
PR: https://git.openjdk.java.net/jfx/pull/409
More information about the openjfx-dev
mailing list