JIDE: invoke LookAndFeelFactory.installJideExtension() early in FlatJidePopupMenuUI to be sure that Jide extensions are installed

This commit is contained in:
Karl Tauber
2021-03-16 13:26:36 +01:00
parent a5e41c573f
commit 46852c0780
3 changed files with 11 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ package com.formdev.flatlaf.jideoss.ui;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import com.formdev.flatlaf.ui.FlatPopupMenuUI;
import com.jidesoft.plaf.LookAndFeelFactory;
import com.jidesoft.plaf.basic.BasicJidePopupMenuUI;
/**
@@ -28,6 +29,10 @@ public class FlatJidePopupMenuUI
extends FlatPopupMenuUI
{
public static ComponentUI createUI( JComponent c ) {
// usually JIDE would invoke this in JidePopupMenu.updateUI(),
// but it does not because FlatLaf already has added the UI class to the UI defaults
LookAndFeelFactory.installJideExtension();
return new FlatJidePopupMenuUI();
}

View File

@@ -67,7 +67,10 @@ public class FlatJideTabbedPaneUI
private Object[] oldRenderingHints;
public static ComponentUI createUI( JComponent c ) {
// usually JIDE would invoke this in JideTabbedPane.updateUI(),
// but it does not because FlatLaf already has added the UI class to the UI defaults
LookAndFeelFactory.installJideExtension();
return new FlatJideTabbedPaneUI();
}

View File

@@ -70,7 +70,10 @@ public class FlatRangeSliderUI
private Object[] oldRenderingHints;
public static ComponentUI createUI( JComponent c ) {
// usually JIDE would invoke this in RangeSlider.updateUI(),
// but it does not because FlatLaf already has added the UI class to the UI defaults
LookAndFeelFactory.installJideExtension();
return new FlatRangeSliderUI();
}