void selectItem (CTableItem item, boolean addToSelection) {
	CTableItem[] oldSelectedItems = selectedItems;
	if (!addToSelection || (getStyle () & SWT.SINGLE) != 0) {
		selectedItems = new CTableItem[] {item};
		if (isFocusControl () || (getStyle () & SWT.HIDE_SELECTION) == 0) {
			for (int i = 0; i < oldSelectedItems.length; i++) {
				if (oldSelectedItems [i] != item) {
					redrawItem (oldSelectedItems [i].index, true);
				}
			}
		}
		for (int i = 0; i < oldSelectedItems.length; i++) {
			oldSelectedItems[i].getAccessible(getAccessible(), 0).selectionChanged();
		}
	} else {
		if (item.isSelected ()) return;
		selectedItems = new CTableItem [selectedItems.length + 1];
		System.arraycopy (oldSelectedItems, 0, selectedItems, 0, oldSelectedItems.length);
		selectedItems [selectedItems.length - 1] = item;
	}

	item.getAccessible(getAccessible(), 0).selectionChanged();
	getAccessible().selectionChanged();
}