Proposal: Add Skin.install() method
Michael Strauß
michaelstrau2 at gmail.com
Thu Jul 21 19:03:26 UTC 2022
I agree with the assessment that skin initialization should not happen
in the constructor of a skin, but only when the skin is actually
installed on a control. You already laid out several reasons, but
here's another: some skin classes call methods in their constructor as
part of skin initialization that are overridden in derived skin
classes. This makes it harder to reason about the state of a skin
under initialization, since methods in derived classes will be called
on a partially constructed object. Adding an install() method and
having a clearly defined life-cycle fixes that also.
More information about the openjfx-dev
mailing list