Proposal: Add Skin.install() method
Michael Strauß
michaelstrau2 at gmail.com
Fri Jul 22 16:44:18 UTC 2022
While it would be a little bit clearer, this idea also limits the
flexibility of the API.
For example, users might want to pass dependencies into skin
instances, or construct skin instances with a factory.
I think it's good enough when controls detect that a skin instance is
set on a different control than the one for which is was constructed.
On Fri, Jul 22, 2022 at 12:49 AM John Hendrikx <john.hendrikx at gmail.com> wrote:
>
> Hi Andy,
>
> Was a single step install process considered, something like:
>
> control.installSkin(MySkin::new);
>
> This would also make it much more clear that Skins are single use only, where the API currently has to bend over backwards to make that clear and enforce it.
>
> Other than that, I think your suggestion would be a definite improvement over the current situation. Something never felt quite right about how skins where set up and attached to controls, it felt fragile and cumbersome -- possibly as the result of relying on a writable property as the means to install a skin.
>
> --John
More information about the openjfx-dev
mailing list