RFR: 8258777: SkinBase: add api to un-/register invalidation-/listChange listeners [v2]
Jeanette Winzenburg
fastegal at openjdk.java.net
Thu Mar 25 14:10:25 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.
@nlisker and @Kevin so we agree, thanks :)
my plan:
- will work on the exact doc along the lines of Nir's suggestion for the xxInvalidationEvent methods
- once that's basically agreed upon, will c&p the spec (with adjustments) to the methods for the other listener types
- at a last step, create the csr draft (that would be a patch for the changeListener methods and simply added spec for the new methods, I assume?)
-------------
PR: https://git.openjdk.java.net/jfx/pull/409
More information about the openjfx-dev
mailing list