On Fri, 12 Aug 2022 17:00:07 GMT, Jeanette Winzenburg <faste...@openjdk.org> 
wrote:

> A quick PoC is in [my fork off Andy's 
> PR](https://github.com/kleopatra/jfx/tree/exp-skin-install-supportsInstall)

@kleopatra : 
Thank you so much for your effort to research the alternatives.

The main issue that necessitates creation of install() and moving it outside of 
the skin's constructor is the fact that certain code just cannot be inside of 
the skin's constructor - because the old skin is still attached.  So it must be 
called after the old skin has been removed in setSkin().  I don't think there 
is a way around it.

Those user-defined skins (and the affected core skins) that modify singletons 
or rely on internals of the superclass - must be refactored.  The others, which 
only add listeners and children nodes, can remain unchanged.

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

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

Reply via email to