mdl.getTreePathSupport().addTreeWillExpandListener(expandingTreeListener);
resultsOutline.setModel(mdl);
TableColumnModel columnModel = resultsOutline.getColumnModel();
ETableColumn nodeColumn0 = (ETableColumn) columnModel.getColumn(0);
Color backColor = resultsOutline.getBackground();
nodeColumn0.setNestedComparator(new DefaultMutableTreeNodeComparator(nodeColumn0));
nodeColumn0.setCellRenderer(new NodeRenderer(backColor));
resultsOutline.setDefaultRenderer(Object.class, new NodeRenderer(backColor));
resultsOutline.setShowHorizontalLines(false);
resultsOutline.setShowVerticalLines(true);
resultsOutline.setGridColor(TreeUtils.getDarkerColor(backColor));
OutlineColumn[] columns = OutlineColumn.values();
for (int i = 0; i < columns.length; i++) {
ETableColumn nodeColumn = (ETableColumn) columnModel.getColumn(i + 1);
nodeColumn.setNestedComparator(new OutlineComparableComparator(nodeColumn));
TableCellRenderer cellRenderer = OutlineColumn.values()[i].getRenderer(backColor);
if (cellRenderer != null) {
nodeColumn.setCellRenderer(cellRenderer);
}
}
// VITAL! We do not want to recreate columns after we have set them up
// with their comparators!