public void paintBorder(Component c, java.awt.Graphics g, int x, int y, int width, int height) {
int iconY;
int iconX = nestingDepth * DefaultOutlineCellRenderer.getNestingWidth();
if( !isLeaf ) {
Icon expIcon = isExpanded
? DefaultOutlineCellRenderer.getExpandedIcon()
: DefaultOutlineCellRenderer.getCollapsedIcon();
if (expIcon.getIconHeight() < height) {
iconY = (height / 2) - (expIcon.getIconHeight() / 2);
} else {
iconY = 0;
}
expIcon.paintIcon(c, g, iconX, iconY);
}
if( null != icon ) {
iconX += DefaultOutlineCellRenderer.getExpansionHandleWidth() + 1;
if (icon.getIconHeight() < height) {
iconY = (height / 2) - (icon.getIconHeight() / 2);
} else {
iconY = 0;
}
icon.paintIcon(c, g, iconX, iconY);
}
}
}