mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
JIDE: use FlatLaf menu scrolling for JidePopupMenu (issue #225)
This commit is contained in:
@@ -20,7 +20,6 @@ import javax.swing.*;
|
|||||||
import javax.swing.plaf.ComponentUI;
|
import javax.swing.plaf.ComponentUI;
|
||||||
import com.formdev.flatlaf.ui.FlatPopupMenuUI;
|
import com.formdev.flatlaf.ui.FlatPopupMenuUI;
|
||||||
import com.jidesoft.plaf.LookAndFeelFactory;
|
import com.jidesoft.plaf.LookAndFeelFactory;
|
||||||
import com.jidesoft.plaf.basic.BasicJidePopupMenuUI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the Flat LaF UI delegate for {@link com.jidesoft.swing.JidePopupMenu}.
|
* Provides the Flat LaF UI delegate for {@link com.jidesoft.swing.JidePopupMenu}.
|
||||||
@@ -38,7 +37,9 @@ public class FlatJidePopupMenuUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Popup getPopup( JPopupMenu popupMenu, int x, int y ) {
|
public Popup getPopup( JPopupMenu popupMenu, int x, int y ) {
|
||||||
Popup popup = BasicJidePopupMenuUI.addScrollPaneIfNecessary( popupMenu, x, y );
|
// not using BasicJidePopupMenuUI.addScrollPaneIfNecessary() anymore because
|
||||||
return popup == null ? super.getPopup( popupMenu, x, y ) : popup;
|
// FlatLaf supports menu scrolling that works better than JIDE menu scrolling
|
||||||
|
// (support mouse wheel scrolling, scales arrows)
|
||||||
|
return super.getPopup( popupMenu, x, y );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user