if (c != null) {
height = c.getPreferredSize().height;
return height;
}
if (tabPlacement == JideTabbedPane.TOP || tabPlacement == JideTabbedPane.BOTTOM) {
View v = getTextViewForTab(tabIndex);
if (v != null) {
// html
height += (int) v.getPreferredSpan(View.Y_AXIS);
}
else {
// plain text
height += metrics.getHeight();
}
Icon icon = _tabPane.getIconForTab(tabIndex);
Insets tabInsets = getTabInsets(tabPlacement, tabIndex);
if (icon != null) {
height = Math.max(height, icon.getIconHeight());
}
height += tabInsets.top + tabInsets.bottom + 2;
}
else {
Icon icon = _tabPane.getIconForTab(tabIndex);
Insets tabInsets = getTabInsets(tabPlacement, tabIndex);
height = tabInsets.top + tabInsets.bottom + 3;
if (icon != null) {
height += icon.getIconHeight() + _textIconGap;
}
View v = getTextViewForTab(tabIndex);
if (v != null) {
// html
height += (int) v.getPreferredSpan(View.X_AXIS);
}
else {
// plain text
String title = getCurrentDisplayTitleAt(_tabPane, tabIndex);
height += SwingUtilities.computeStringWidth(metrics, title);