RFR: 8294809: ListenerHelper for managing and disconnecting listeners [v9]
Andy Goryachev
angorya at openjdk.org
Tue Nov 15 18:27:12 UTC 2022
On Tue, 15 Nov 2022 06:35:05 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:
>> Exactly. In its current form, `ListenerHelper` is a utility helper class for Skins, and should be reviewed with that in mind. As discussed in previous comments, there are several things that will need to change when/if this is proposed as a more general utility. We can defer that discussion, since this is entirely an internal helper class for now.
>>
>> As a next step, after this is integrated and before any discussion of making this a public utility, it can be used as a replacement for `LambdaMultiplePropertyChangeListenerHandler` -- see [JDK-8296076](https://bugs.openjdk.org/browse/JDK-8296076).
>
> Although it is an internal (non-public) utility class, once introduced, it will be tempting to use it from non-Skin code as well.
> If the current scope is limited to provide "a utility helper class for Skins" then how about doing one of two things-
> 1) Mention the current intention and possible future modifications as a block comment above the `ListenerHelper` class
> 2) Keep only common methods in`ListenerHelper` class and move `Skin` specific code to a class derived from `ListenerHelper`. Skins should start using this derived class.
added comment for #1 option.
-------------
PR: https://git.openjdk.org/jfx/pull/908
More information about the openjfx-dev
mailing list