}
public Component getTreeCellRendererComponent(final JTree tree,
final Object value, final boolean selected, final boolean expanded,
final boolean leaf, final int row, final boolean hasFocus) {
final INodeForObject nodeForObject = (INodeForObject) value;
//final TreePath path = tree.getPathForRow(row);
//String field;
final boolean fieldIsStatic=false;
// if (path == null) {
// field = "-no path for row-";
// fieldIsStatic = false;
// } else {
// final TreePath parentPath = path.getParentPath();
// if (/* nodeForObject.isLeafNode() || */parentPath == null) {
// field = "";
// fieldIsStatic = false;
// } else {
// final INodeForObject parentNode = (INodeForObject) parentPath
// .getLastPathComponent();
// final String field2 = parentNode.getField(nodeForObject);
// if (field2 == null) {
// field = " -" + parentNode.getId() + " have not child #"
// + nodeForObject.getId() + "-";
// fieldIsStatic = false;
// } else {
// field = " " + field2;
// final Boolean fieldIsStatic2 = parentNode
// .fieldIsStatic(nodeForObject);
// if (fieldIsStatic2 == null) {
// fieldIsStatic = false;
// } else {
// fieldIsStatic = fieldIsStatic2;
// }
// }
// }
// }
final Font font = tree.getFont();
setFont(font);
try {
final StringBuilder stringBuilder=new StringBuilder();
stringBuilder.append(nodeForObject.identificationString());
setText(stringBuilder.toString());
// if (nodeForObject == null) {
// setText("null");
// } else {
// final String string = nodeForObject.identificationString();
// if (string == null) {
// setText("<null string>");
// } else {
// setText(string + field);
// }
// }
Icon icon;
if (nodeForObject.isLeafNode()) {
if (nodeForObject.isMarkedNew()) {
icon = fieldIsStatic ? sobjectLeafNewIcon
: objectLeafNewIcon;
} else if (nodeForObject.isMarkedNewSon()) {
icon = fieldIsStatic ? sobjectLeafNewSonIcon
: objectLeafNewSonIcon;
} else {
icon = fieldIsStatic ? sobjectLeafIcon : objectLeafIcon;
}
} else {
if (nodeForObject.isMarkedNew()) {
icon = fieldIsStatic ? sobjectNewIcon : objectNewIcon;
} else if (nodeForObject.isMarkedNewSon()) {
icon = fieldIsStatic ? sobjectNewSonIcon : objectNewSonIcon;
} else {
icon = fieldIsStatic ? sobjectIcon : objectIcon;
}
}