On Thu, 11 Aug 2022 14:04:25 GMT, Marius Hanl <[email protected]> wrote:

>> It is a bit weird as `Popups` are not using the `getSkinnable` method it 
>> looks like. And also the `getSkinnable` method javadoc states: `Gets the 
>> Skinnable to which this Skin is assigned.` which is not true for the 
>> `ComboBox` Popup (as it sets the `ComboBox` as the skinnable) - while it 
>> makes sense that the `ComboBox` is set as styleable parent.
>
> So it is even more weird:
> `getSkinnable()` is always called in `Control` skins, `getNode()` is only 
> called in `Control.getSkinNode()`, `PaginationSkin` and `TableColumnHeader` 
> (so not very much).
> `getNode()` is always called for `Popups` (no `getSkinnable()` is called).
> 
> The only exception is the internal class `InputFieldSkin`, where the node is 
> an 'inner TextField' and the skinnable the control where it is installed on.

I agree.  The whole mess stems from the fact that Skinnable is being passed to 
the Skin's constructor, instead of being passed to install(), as in Swing.  
But, at this point, _it is what it is_.

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

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

Reply via email to