RFR: 8258777: SkinBase: add api to un-/register invalidation-/listChange listeners [v2]
Kevin Rushforth
kcr at openjdk.java.net
Thu Mar 25 14:02:30 UTC 2021
On Thu, 25 Mar 2021 13:52:20 GMT, Nir Lisker <nlisker at openjdk.org> wrote:
>>>
>>>
>>> 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.
Making this change seems fine to me, and better than using different language in the new methods without fixing the existing.
> I don't know if this will need to be part of the CSR, though.
It would be best to include them.
-------------
PR: https://git.openjdk.java.net/jfx/pull/409
More information about the openjfx-dev
mailing list