.createLayoutManager());
}
public void testGetMinimumSize() throws Exception {
ui.setComboBox(comboBox);
ComboPopup popup = new BasicComboPopup(comboBox);
ui.setPopup(popup);
ui.setListBox(popup.getList());
ui.installListeners();
comboBox.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
Dimension listPart = new BasicComboBoxRenderer().getListCellRendererComponent(
popup.getList(), "", -1, false, false).getPreferredSize();
Dimension expectedSize = new Dimension(listPart.width + listPart.height + 8,
listPart.height + 8);
assertEquals(expectedSize, ui.getMinimumSize(null));
assertEquals(expectedSize, ui.getCachedMinimumSize());
ui.setCachedMinimumSize(new Dimension(100, 100));
assertEquals(ui.getCachedMinimumSize(), ui.getMinimumSize(null));
comboBox.addItem("aaa");
listPart = new BasicComboBoxRenderer().getListCellRendererComponent(popup.getList(),
"aaa", -1, false, false).getPreferredSize();
expectedSize = new Dimension(listPart.width + listPart.height + 8, listPart.height + 8);
assertEquals(expectedSize, ui.getMinimumSize(null));
}