/**
* Sets the icon and displayable text for the given component.
*
* @return Component this - the component whose layout was done
* @param tree the JTree it belongs to
* @param value the object itself
* @param sel if the object is selected
* @param expanded if the object is expanded
* @param leaf if the object is a leaf
* @param row the object's row
* @param hasfocus if the object has the focus
*/
public final Component getTreeCellRendererComponent (final JTree tree,
final Object value, final boolean sel, final boolean expanded,
final boolean leaf, final int row, final boolean hasfocus)
{
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row,
hasfocus);
// hier den Vergleich von Parameter value mit deinem MethodCall
if (value instanceof MethodCall) {
MethodCall mc = (MethodCall) value;
if (mc.equals(activeString)) {
this.setForeground(Color.RED);
} else {
this.setForeground(Color.GREY);
}
return this;
}