RFR: 8290844: Add Skin.install() method [v9]

Andy Goryachev angorya at openjdk.org
Fri Oct 7 18:55:57 UTC 2022


On Wed, 5 Oct 2022 12:21:22 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> re-phrased the comment, please let me know if the new version is clearer (or suggest an alternative if not).
>
> hmm .. it's still using setSkin :)
> 
> What about following the lead of dispose doc closely:
> 
>> Called by Skinnable when the Skin is attached/set (whatever, you are the native speakers ;) to the Skinnable. This method allows a Skin to ... (same as currently) ..
>> 
>> Must be called exactly once _after_ a previous Skin - if any - is disposed.
>> 
>> (same as current)
>> 
>> 
> 
> Still not quite sure the spec is clear enough to express the precondition for this method: in words it's something like "there must not be any other skin with other.getSkinnable() == this.getSkinnable()", that is all other potential skins are disposed - but that sounds a bit unbounded ...
> 
> Aside: strictly speaking, the dispose doc is over-specified "Called by the Skinnable.." - which is making our own code violating that contract: dispose is called freely from other collaborators, f.i. during auto-sizing of columns, doing layout in VirtualFlow .. just saying :)

re-phrased a bit, see if you like it better.

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

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


More information about the openjfx-dev mailing list