public java.awt.Component | getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
final DocumentDescriptor d = (DocumentDescriptor)
((DefaultMutableTreeNode) value).getUserObject();
final JPanel p = new JPanel();
final JTextArea text = new JTextArea();
text.append(renderAsString(d));
text.setFont(new Font("Monospaced", Font.PLAIN, 10));
p.add(text);
if (selected)
Util.invert(text);
return p;
|