Image image = getImage (columnIndex);
Image image = getImage (columnIndex, false);
void paint (GC gc, TableColumn column, boolean paintCellContent) {	if (!parent.checkData (this, true)) return;	int columnIndex = 0, x = 0;	if (column != null) {		columnIndex = column.getIndex ();		x = column.getX ();	}	/* if this cell is completely to the right of the client area then there's no need to paint it */	Rectangle clientArea = parent.getClientArea ();	if (clientArea.x + clientArea.width < x) return;	Rectangle cellBounds = getCellBounds (columnIndex);	if (parent.linesVisible) {		cellBounds.y++;		cellBounds.height--;	}	int cellRightX = 0;	if (column != null) {		cellRightX = column.getX () + column.width;	} else {		cellRightX = cellBounds.x + cellBounds.width;	}	/* restrict the clipping region to the cell */	gc.setClipping (x, cellBounds.y, clientArea.width - x, cellBounds.height);		int y = parent.getItemY (this);	int itemHeight = parent.itemHeight;	/* draw the background color of this cell */	Color background = getBackground (columnIndex);	if (columnIndex == 0 && (column == null || column.getOrderIndex () == 0)) {		Rectangle focusBounds = getFocusBounds ();				gc.setBackground (parent.getBackground ());		if (focusBounds.x > 0) {			/* fill space to left of selection rect */			gc.fillRectangle (0, y, focusBounds.x, itemHeight);		}		if (column == null) {			/* fill space to right of selection rect */			int rightX = focusBounds.x + focusBounds.width;			int width = clientArea.width - rightX;			if (width > 0) {				gc.fillRectangle (rightX, y, width, itemHeight);			}		}				int fillWidth = 0;		if (column == null) {			fillWidth = focusBounds.width;		} else {			fillWidth = column.width - focusBounds.x;			if (parent.linesVisible) fillWidth--;		}		gc.setBackground (background);		gc.fillRectangle (focusBounds.x, focusBounds.y, fillWidth, focusBounds.height);	} else {		int fillWidth = cellBounds.width;		if (parent.linesVisible) fillWidth--;		gc.setBackground (background);		gc.fillRectangle (cellBounds.x, cellBounds.y, fillWidth, cellBounds.height);	}	/* draw the selection bar if the receiver is selected */	if (isSelected () && (columnIndex == 0 || (parent.style & SWT.FULL_SELECTION) != 0)) {		if (parent.hasFocus () || (parent.style & SWT.HIDE_SELECTION) == 0) {			gc.setBackground (display.getSystemColor (SWT.COLOR_LIST_SELECTION));			if (columnIndex == 0) {				Rectangle focusBounds = getFocusBounds ();				int startX, fillWidth;				if (column == null || column.getOrderIndex () == 0 || (parent.style & SWT.FULL_SELECTION) == 0) {					startX = focusBounds.x + 1;		/* space for left bound of focus rect */				} else {					startX = column.getX ();				}				if (column == null) {					fillWidth = focusBounds.width - 2;				} else {					fillWidth = column.getX () + column.width - startX;					if (column.getOrderIndex () == parent.columns.length - 1 || (parent.style & SWT.FULL_SELECTION) == 0) {						fillWidth -= 2;	/* space for right bound of focus rect */					}				}				if (fillWidth > 0) {					gc.fillRectangle (startX, focusBounds.y + 1, fillWidth, focusBounds.height - 2);				}			} else {				int startX = column.getX ();				int fillWidth = column.width;				if (column.getOrderIndex () == 0) {					startX += 1;	/* space for left bound of focus rect */					fillWidth -= 1;				}				if (column.getOrderIndex () == parent.columns.length - 1) {					fillWidth -= 2;		/* space for right bound of focus rect */				}				if (fillWidth > 0) {					gc.fillRectangle (						column.getX (),						cellBounds.y + 1,						fillWidth,						cellBounds.height - 2);				}			}		}	}	if (!paintCellContent) return;	/* Draw checkbox if drawing column 0 and parent has style SWT.CHECK */	if (columnIndex == 0 && (parent.style & SWT.CHECK) != 0) {		Image baseImage = grayed ? parent.getGrayUncheckedImage () : parent.getUncheckedImage ();		Rectangle checkboxBounds = getCheckboxBounds ();		gc.drawImage (baseImage, checkboxBounds.x, checkboxBounds.y);		/* Draw checkmark if item is checked */		if (checked) {			Image checkmarkImage = parent.getCheckmarkImage ();			Rectangle checkmarkBounds = checkmarkImage.getBounds ();			int xInset = (checkboxBounds.width - checkmarkBounds.width) / 2;			int yInset = (checkboxBounds.height - checkmarkBounds.height) / 2;			gc.drawImage (checkmarkImage, checkboxBounds.x + xInset, checkboxBounds.y + yInset);		}	}	Image image = getImage (columnIndex);	String text = getDisplayText (columnIndex);	Rectangle imageArea = getImageBounds (columnIndex);	int startX = imageArea.x;		/* while painting the cell's content restrict the clipping region */	int padding = parent.getCellPadding ();	gc.setClipping (		startX,		cellBounds.y + padding - (parent.linesVisible ? 1 : 0),		cellRightX - startX - padding,		cellBounds.height - 2 * (padding - (parent.linesVisible ? 1 : 0)));	/* draw the image */	if (image != null) {		Rectangle imageBounds = image.getBounds ();		gc.drawImage (			image,			0, 0,									/* source x, y */			imageBounds.width, imageBounds.height,	/* source width, height */			imageArea.x, imageArea.y,				/* dest x, y */			imageArea.width, imageArea.height);		/* dest width, height */	}		/* draw the text */	if (text.length () > 0) {		gc.setFont (getFont (columnIndex));		int fontHeight = getFontHeight (columnIndex);		if (isSelected () && (columnIndex == 0 || (parent.style & SWT.FULL_SELECTION) != 0)) {			if (parent.hasFocus () || (parent.style & SWT.HIDE_SELECTION) == 0) {				gc.setForeground (display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT));			}		} else {			gc.setForeground (getForeground (columnIndex));		}		x = getTextX (columnIndex) + MARGIN_TEXT;		gc.drawString (text, x, y + (itemHeight - fontHeight) / 2, true);	}}