Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (myCurrentCallback instanceof CustomizeColoredTreeCellRendererReplacement) { return ((CustomizeColoredTreeCellRendererReplacement)myCurrentCallback) .getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); } clear(); setBackground(UIUtil.getBgFillColor(tree)); if (myCurrentCallback != null) { myCurrentCallback.customizeCellRenderer(this, tree, value, selected, expanded, leaf, row, hasFocus); } if (getFont() == null) { setFont(tree.getFont()); } return this; }