On Wed, 27 Jul 2022 20:28:31 GMT, Andy Goryachev <[email protected]> wrote:

>> Yes, but that can be fixed so the rule is not violated.
>
> I like this idea.
> 
> However, I am afraid that the impact of the check in PopupControl might be 
> greater than expected.  In addition to your 
> ComboBoxPopupcontrol.createPopup() fix you provided earlier, there is a 
> similar situation with TooltipSkin in PopupcontrolTest:604:
> 
> 
>         Tooltip tooltip = new Tooltip("Hello");
>         TooltipSkin skin = new TooltipSkin(tooltip);
>         popup.setSkin(skin);
> 
> 
> it is not entirely clear to me why a TooltipSkin is installed as a skin for 
> the popup instead of the tooltip.
> 
> I think we should rather say that this 1:1 rule does not apply to 
> PopupControls.

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.

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

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

Reply via email to