Component result = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
if (result != null && value != null && result instanceof JLabel && value instanceof DisplayNode) {
DisplayNode aNode = (DisplayNode)value;
JLabel aLabel = (JLabel)result;
ImageData image = selected ? aNode.getDVSelectedIcon() : aNode.getDVSmallIcon();
if (image == null) image = !selected ? aNode.getDVSelectedIcon() : aNode.getDVSmallIcon();
if (image == null){
aLabel.setIcon(null);
} else {
ImageIcon icon = new ImageIcon(image.getValue().getScaledInstance(16, 16, Image.SCALE_DEFAULT));
aLabel.setIcon(icon);
}
if ((aNode.getDVNodeText() == null)||(aNode.getDVNodeText().length()==0))//PM:7 oct. 2008:performance
aLabel.setText(aNode.toString());
else