On Fri, 28 Oct 2022 20:02:40 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/javafx/scene/control/SkinBase.java 
>> line 222:
>> 
>>> 220:      * @since 20
>>> 221:      */
>>> 222:     protected ListenerHelper listenerHelper() {
>> 
>> This would make it part of the public API, so you will need to find some 
>> other way to do this without adding anything to the public API surface.
>
> I *do* want this as public API.
> 
> I can change the code to use an accessor, but it gets really ugly:
> 
> 
> ListenerHelper.get(PaginationSkin.this).addListChangeListener(getSkinnable().getStyleClass(),
>  (ch) -> {
> 
> 
> Besides, what's the harm of adding a [better] public API?  I do want 
> ListenerHelper to be public anyway.

changed the code to remove listenerHelper() to avoid changing the public API.
For now, will be using accessor, and using a local variable in skins where we 
have many calls to LH (in constructors, for example).

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

PR: https://git.openjdk.org/jfx/pull/908

Reply via email to