Re: Proposal: Add Skin.install() method

2022-08-12 Thread Jeanette Winzenburg
are not yet handled (most don't even have an issue yet). -- Jeanette Thank you so much for your comments! -andy From: openjfx-dev on behalf of Jeanette Winzenburg Date: Thursday, 2022/07/21 at 09:04 To: openjfx-dev@openjdk.org Subject: Re: Proposal: Add Skin.install() metho

Re: Aw: Re: Proposal: Add Skin.install() method

2022-07-26 Thread Andy Goryachev
9 To: openjfx-dev@openjdk.org<mailto:openjfx-dev@openjdk.org> <mailto:openjfx-dev@openjdk.org> Subject: Re: Proposal: Add Skin.install() method Hi Andy, Was a single step install process considered, something like: control.installSkin(MySkin::new); This would also make it much more cle

Re: Aw: Re: Proposal: Add Skin.install() method

2022-07-26 Thread Kevin Rushforth
of John Hendrikx *Date: *Thursday, 2022/07/21 at 15:49 *To: *openjfx-dev@openjdk.org *Subject: *Re: Proposal: Add Skin.install() method Hi Andy, Was a single step install process considered, something like: control.installSkin(MySkin::new);

Aw: Re: Proposal: Add Skin.install() method

2022-07-26 Thread Marius Hanl
ySkin::new) such a model will be impossible.   Thank you -andy     From: openjfx-dev on behalf of John Hendrikx Date: Thursday, 2022/07/21 at 15:49 To: openjfx-dev@openjdk.org Subject: Re: Proposal: Add Skin.install() method Hi Andy, Was a single step

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-23 Thread Kevin Rushforth
Goryachev , openjfx-dev@openjdk.org , Philip Race *Subject: *Re: [External] : Aw: Proposal: Add Skin.install() method Yes, but a RuntimeException only appears in the javadoc, and not in the method signature (only checked exceptions show up in the method signature). -- Kevin On 7/22/2022 2:39

Re: Proposal: Add Skin.install() method

2022-07-23 Thread John Hendrikx
Not sure why you think this would make that less flexible. It's just a factory, which can be a Lambda.    @Inject    MySkin(Control c, OtherStuff os) { } Have the injector framework provide you with an assisted injected function/factory:    Function  assistedFactory; // takes a c

Re: Proposal: Add Skin.install() method

2022-07-23 Thread John Hendrikx
: *Re: Proposal: Add Skin.install() method 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

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
(Skin value); -andy From: Kevin Rushforth Date: Friday, 2022/07/22 at 14:54 To: Andy Goryachev , openjfx-dev@openjdk.org , Philip Race Subject: Re: [External] : Aw: Proposal: Add Skin.install() method Yes, but a RuntimeException only appears in the javadoc, and not in the method signature

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Kevin Rushforth
IllegalArgumentException { -andy *From: *Kevin Rushforth *Date: *Friday, 2022/07/22 at 14:20 *To: *Andy Goryachev , openjfx-dev@openjdk.org *Subject: *Re: [External] : Aw: Proposal: Add Skin.install() method No, sorry. Error doesn't communicate the right thing. This is exactly is

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
Thank you, Phil and Kevin. @Override public final void setSkin(Skin value) throws IllegalArgumentException { -andy From: Kevin Rushforth Date: Friday, 2022/07/22 at 14:20 To: Andy Goryachev , openjfx-dev@openjdk.org Subject: Re: [External] : Aw: Proposal: Add Skin.install() method No

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Kevin Rushforth
behalf of Kevin Rushforth <mailto:kevin.rushfo...@oracle.com> *Date: *Friday, 2022/07/22 at 12:33 *To: *openjfx-dev@openjdk.org <mailto:openjfx-dev@openjdk.org> *Subject: *Re: [External] : Aw: Proposal: Add Skin.install() method I would not be in favor of adding

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Philip Race
<mailto:openjfx-dev-r...@openjdk.org> on behalf of Kevin Rushforth <mailto:kevin.rushfo...@oracle.com> *Date: *Friday, 2022/07/22 at 12:33 *To: *openjfx-dev@openjdk.org <mailto:openjfx-dev@openjdk.org> *Subject: *Re: [External] : Aw: Proposal: Add Skin.install() met

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
Subject: Re: [External] : Aw: Proposal: Add Skin.install() method I don't know if you really meant Error, as in java.lang.Error, but it would need to be a subclass of RuntimeException. IllegalArgumentException seems the natural choice (a case could possibly be made for IllegalStateException

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Kevin Rushforth
ernal] : Aw: Proposal: Add Skin.install() method I would not be in favor of adding a no-arg constructor to SkinBase, for the reasons Andy gave. Additionally, there would be no way to avoid braking the contract of Skin::getSkinnable which says: "This value will only ever go from a non-nu

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
@openjdk.org Subject: Re: [External] : Aw: Proposal: Add Skin.install() method I would not be in favor of adding a no-arg constructor to SkinBase, for the reasons Andy gave. Additionally, there would be no way to avoid braking the contract of Skin::getSkinnable which says: "This value will only ev

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Kevin Rushforth
skin for one control and setting it in the other is a no-no.  Or, perhaps we should explicitly check for this condition in setSkin(). Thank you -andy *From: *Marius Hanl *Date: *Friday, 2022/07/22 at 05:06 *To: *openjfx-dev@openjdk.org , Andy Goryachev *Subject: *[External] : Aw: Propos

Re: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
handler and throw an Error (as in design error). -andy From: openjfx-dev on behalf of Kevin Rushforth Date: Friday, 2022/07/22 at 12:15 To: openjfx-dev@openjdk.org Subject: Re: Proposal: Add Skin.install() method I think the Skin.install proposal is a good one; it looks ready to move forward. I

Re: Proposal: Add Skin.install() method

2022-07-22 Thread Kevin Rushforth
rikx *Date: *Thursday, 2022/07/21 at 15:49 *To: *openjfx-dev@openjdk.org *Subject: *Re: Proposal: Add Skin.install() method 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

Re: Proposal: Add Skin.install() method

2022-07-22 Thread Michael Strauß
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 cont

Re: [External] : Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
2022/07/22 at 05:06 To: openjfx-dev@openjdk.org , Andy Goryachev Subject: [External] : Aw: Proposal: Add Skin.install() method I had a similar idea in the past and like the idea. Ideally, setting/switching a skin is a one step process. Currently you can construct a skin for a control and set it

Re: Proposal: Add Skin.install() method

2022-07-22 Thread Andy Goryachev
ion -> configuration -> uninstall old skin -> install new skin. with installSkin(MySkin::new) such a model will be impossible. Thank you -andy From: openjfx-dev on behalf of John Hendrikx Date: Thursday, 2022/07/21 at 15:49 To: openjfx-dev@openjdk.org Subject: Re: Proposal: Add

Aw: Proposal: Add Skin.install() method

2022-07-22 Thread Marius Hanl
I had a similar idea in the past and like the idea.Ideally, setting/switching a skin is a one step process. Currently you can construct a skin for a control and set it after to a different control.Your approach sounds good, if you can set a skin by creating a new skin (with a default construc

Re: Proposal: Add Skin.install() method

2022-07-21 Thread John Hendrikx
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 thin

Re: [External] : Re: Proposal: Add Skin.install() method

2022-07-21 Thread Andy Goryachev
44 Cheers, -andy From: Michael Strauß Date: Thursday, 2022/07/21 at 12:03 To: Andy Goryachev Cc: openjfx-dev@openjdk.org Subject: [External] : Re: Proposal: Add Skin.install() method I agree with the assessment that skin initialization should not happen in the constructor of a skin, but onl

Re: Proposal: Add Skin.install() method

2022-07-21 Thread Michael Strauß
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 initializatio

Re: Proposal: Add Skin.install() method

2022-07-21 Thread Andy Goryachev
enjdk.org/browse/JDK-8241364> ☂ Cleanup skin implementations. Thank you so much for your comments! -andy From: openjfx-dev on behalf of Jeanette Winzenburg Date: Thursday, 2022/07/21 at 09:04 To: openjfx-dev@openjdk.org Subject: Re: Proposal: Add Skin.install() method Zitat von An

Re: Proposal: Add Skin.install() method

2022-07-21 Thread Jeanette Winzenburg
Zitat von Andy Goryachev : Hi Andy, good idea to move our discussion from the issues to the mailling - it's both easier and reaches a broader audience :) Will answer in about a week or so, for now just stumbled across We can see the damage caused by looking at JDK-8241364

Proposal: Add Skin.install() method

2022-07-20 Thread Andy Goryachev
Hi, I'd like to propose an API change in Skin interface (details below). Your feedback will be greatly appreciated! Thank you, -andy Summary --- Introduce a new Skin.install() method with an empty default implementation. Modify Control.setSkin(Skin) implementation to invoke install(