if (event == null || (event.detail & (SWT.HOT | SWT.SELECTED | SWT.FOCUSED)) == 0) {
int pos;
TableItemOrTreeItem parentItem = item.getParentItem();
if (parentItem != null) {
pos = parentItem.indexOf(item) + ((table.indexOf(parentItem) + 1) % 2);
} else {
pos = table.indexOf(item);
}
Color color = alternatingColors[pos % 2];
if (color != null) {