package org.objectweb.proactive.ic2d.gui.jobmonitor;

import java.awt.Color;
import java.awt.Component;

import javax.swing.Icon;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;

import org.objectweb.proactive.ic2d.gui.jobmonitor.data.DataTreeModel;
import org.objectweb.proactive.ic2d.gui.jobmonitor.data.DataTreeNode;

public class JobMonitorTreeCellRenderer extends DefaultTreeCellRenderer implements JobMonitorConstants
{
	public Component getTreeCellRendererComponent (JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row,boolean hasFocus)
	{
		super.getTreeCellRendererComponent (tree, value, sel, expanded, leaf, row, hasFocus);
		
		DataTreeNode currentNode = (DataTreeNode) value;
		int key = currentNode.getKey();
		Icon icon = Icons.getIconForKey(key);		
		if (icon != null)
			setIcon (icon);

		DataTreeModel model = (DataTreeModel) tree.getModel();
		setForeground(model.isHighlighted(key) ? Color.RED : null);
		return this;
	}
}

@@ -65,19 +65,23 @@
 a.awt.Co
-lor
+mponent
 ;%0Aimport
@@ -86,31 +86,26 @@
 rt java.awt.
-Compone
+Fo
 nt;%0A%0Aimport 
@@ -445,16 +445,61 @@
 tants%0A%7B%0A
+%09private static Font highlightFont = null;%0A%09%0A
 %09public 
@@ -959,21 +959,100 @@
 ;%0A%09%09
-setForeground
+%0A%09%09if (highlightFont == null)%0A%09%09%09highlightFont = getFont().deriveFont(Font.BOLD);%0A%0A%09%09setFont
 (mod
@@ -1079,17 +1079,21 @@
 ) ? 
-Color.RED
+highlightFont
  : n

Highlighted text is in bold instead of red