final HintletReport.Resources resources = getResources();
final HintletReport.Css css = resources.hintletReportCss();
TableCellElement cell = headerRowElem.insertCell(index);
Container cellContainer = new DefaultContainerImpl(cell);
SortableTableHeader header;
switch (columnType) {
case COL_SEVERITY:
cell.setClassName(css.reportRowDetailSeverityCell());
header = new SortableTableHeader(cellContainer, "", resources);
header.addSortToggleListener(new SeveritySortToggle());
break;
case COL_TIME:
cell.setClassName(css.reportRowDetailTimeCell());
header = new SortableTableHeader(cellContainer, "Time", resources);
header.addSortToggleListener(new TimeSortToggle());
break;
case COL_RULE_NAME:
cell.setClassName(css.reportRowDetailCell());
header = new SortableTableHeader(cellContainer, "RuleName", resources);
header.addSortToggleListener(new RuleSortToggle());
break;
case COL_DESCRIPTION:
default:
cell.setClassName(css.reportRowDetailCell());
header = new SortableTableHeader(cellContainer, "Description",
resources);
header.addSortToggleListener(new DescriptionSortToggle());
break;
}
columnHeaders.add(header);
headerGroup.add(header);
}