return preferredHeight;
}
@Override
public Dimensions getPreferredSize() {
ListButton listButton = (ListButton)getComponent();
Button.DataRenderer dataRenderer = listButton.getDataRenderer();
// Determine the preferred width and height of the current button data
dataRenderer.render(listButton.getButtonData(), listButton, false);
Dimensions contentSize = dataRenderer.getPreferredSize();
int preferredWidth = contentSize.width;
int preferredHeight = contentSize.height + padding.top + padding.bottom + 2;
// The preferred width of the button is the max. width of the rendered
// content plus padding and the trigger width
List<?> listData = listButton.getListData();
for (Object item : listData) {
dataRenderer.render(item, listButton, false);
preferredWidth = Math.max(preferredWidth, dataRenderer.getPreferredWidth(-1));
}