public java.awt.Component | getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
CategoryNode node = (CategoryNode) value;
//FileNode node = (FileNode)value;
//String s = tree.convertValueToText(value, selected,
// expanded, leaf, row, hasFocus);
super.getTreeCellRendererComponent(
tree, value, selected, expanded,
leaf, row, hasFocus);
if (row == 0) {
// Root row -- no check box
_checkBox.setVisible(false);
} else {
_checkBox.setVisible(true);
_checkBox.setSelected(node.isSelected());
}
String toolTip = buildToolTip(node);
_panel.setToolTipText(toolTip);
if (node.hasFatalChildren()) {
this.setForeground(FATAL_CHILDREN);
}
if (node.hasFatalRecords()) {
this.setForeground(Color.red);
}
return _panel;
|