selectionExtent = paintItem.getSelectionExtent(); if (selectionExtent != null) { selectionPosition = new Point(paintItem.getSelectionX(), getRedrawY(paintItem)); drawSelection(paintItem, event.gc, selectionPosition, selectionExtent); } columns = paintColumns.elements();
paintXPosition = paintItem.getSelectionX(); paintYPosition = getRedrawY(paintItem); fullSelectionExtent = getFullSelectionExtent(paintItem); gc.setBackground(paintItem.getBackground()); gc.fillRectangle(paintXPosition, paintYPosition, fullSelectionExtent.x, fullSelectionExtent.y);  if (paintItem.isSelected() == true) { selectionExtent = paintItem.getSelectionExtent(); gc.setBackground(selectionColor); gc.fillRectangle(paintXPosition, paintYPosition, selectionExtent.x, selectionExtent.y); } columns = paintColumns.elements();
TableItem paintItems(Event event, int topPaintIndex, int bottomPaintIndex, Vector paintColumns) {	Enumeration columns;	TableColumn column;	TableItem paintItem;	TableItem focusItem = null;	Point selectionExtent;	Point selectionPosition;	int itemHeight = getItemHeight();	topPaintIndex += getTopIndex();	bottomPaintIndex += getTopIndex();	for (int i = topPaintIndex; i <= bottomPaintIndex; i++) {		paintItem = (TableItem) getVisibleItem(i);		selectionExtent = paintItem.getSelectionExtent();		if (selectionExtent != null) {			selectionPosition = new Point(paintItem.getSelectionX(), getRedrawY(paintItem));			drawSelection(paintItem, event.gc, selectionPosition, selectionExtent);		}		columns = paintColumns.elements();		while (columns.hasMoreElements() == true) {			column = (TableColumn) columns.nextElement();			paintSubItem(event, paintItem, column, i * itemHeight);		}		if (hasFocus(paintItem)) {			focusItem = paintItem;		}	}	return focusItem;}