* Bug fix from Compiere 260c

This commit is contained in:
Heng Sin Low 2007-03-01 13:49:16 +00:00
parent 2f2230a46a
commit c1799b2894
1 changed files with 15 additions and 0 deletions

View File

@ -71,4 +71,19 @@ public class AdempiereComboPopup extends BasicComboPopup
(CComboBox)comboBox).hidingPopup(); (CComboBox)comboBox).hidingPopup();
} // hided } // hided
/**/ /**/
/**
* @see javax.swing.plaf.basic.BasicComboPopup#getPopupHeightForRowCount(int)
**/
@Override
protected int getPopupHeightForRowCount(int maxRowCount)
{
// ensure the combo box sized for the amount of data to be displayed
int rows = comboBox.getItemCount() < comboBox.getMaximumRowCount()
? comboBox.getItemCount()
: comboBox.getMaximumRowCount() ;
if (rows <= 0 ) rows = 1;
return super.getPopupHeightForRowCount(1) * rows;
}
} // AdempiereComboPopup } // AdempiereComboPopup