Limit the display range of the ComboBox's Popupmenu

我正在编写一个插件,其中有一个ComboBox用于显示选项,但是当我在用LookAndFeel来改变ComboBox的外观时,我发现它的Popupmenu大小会超出插件本身,我重写了其中的一个函数: