protected void paintText(Graphics g, int tabPlacement, Font font, FontMetrics metrics,
int tabIndex, String title, Rectangle textRect, boolean isSelected)
{
g.setFont(font);
View v = getTextViewForTab(tabIndex);
if(v != null) {
v.paint(g, textRect);
}
else {
int mnemIndex = tabPane.getDisplayedMnemonicIndexAt(tabIndex);
if(tabPane.isEnabled() && tabPane.isEnabledAt(tabIndex)) {
g.setColor(tabPane.getForegroundAt(tabIndex));
}
else {
g.setColor(Theme.tabDisabledTextColor.getColor());
}
TinyUtils.drawStringUnderlineCharAt(tabPane, g, title,
mnemIndex, textRect.x, textRect.y + metrics.getAscent());
}
}