RFR: 8290844: Add Skin.install() method
Andy Goryachev
angorya at openjdk.org
Mon Aug 8 20:37:51 UTC 2022
On Wed, 27 Jul 2022 20:02:37 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> sorry, what check?
>>
>> if you mean
>> if (skin != null) {
>> if(skin.getSkinnable() != Control.this) {
>>
>> we can't because PopupControl violates the 1:1 rule.
>
> 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.
-------------
PR: https://git.openjdk.org/jfx/pull/845
More information about the openjfx-dev
mailing list