return new JLabel(value.toString());
}
MCTMutableTreeNode node = (MCTMutableTreeNode) value;
WeakReference<View> viewRef = renderedComponent.get(node);
View view = viewRef == null ? null : viewRef.get();
if (view == null) {
view = (View) node.getUserObject();
view.addMonitoredGUI(node);
renderedComponent.put(node, new WeakReference<View>(view));
}
// We highlight the tree node if either it's selected or it's
// the target of a drag-and-drop.
JTree.DropLocation dropLocation = tree.getDropLocation();
if (sel
|| (dropLocation != null
&& dropLocation.getChildIndex() == -1
&& tree.getRowForPath(dropLocation.getPath()) == row)) {
view.setBackground(LafColor.TREE_SELECTION_BACKGROUND);
} else {
view.setBackground(LafColor.WINDOW);
}
return view;
}