if (columnIndex == parent.columns.length - 1) {
if (column.getOrderIndex () == 0) { startX += 1;	 fillWidth -= 1; } if (column.getOrderIndex () == parent.columns.length - 1) {
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);	int cellRightX = 0;	if (column != null) {		cellRightX = column.getX () + column.width;	} else {		cellRightX = cellBounds.x + cellBounds.width;	}	/* if this cell is completely to the left of the client area then there's no need to paint it */	if (cellRightX < 0) return;	/* restrict the clipping region to the cell */	gc.setClipping (x, cellBounds.y, cellRightX - x, cellBounds.height);		int y = parent.getItemY (this);	int padding = parent.getCellPadding ();	int itemHeight = parent.itemHeight;	/* draw the background color if this item has a custom color set */	Color background = getBackground (columnIndex);	if (!background.equals (parent.getBackground ())) {		Color oldBackground = gc.getBackground ();		gc.setBackground (background);		TableColumn[] orderedColumns = parent.orderedColumns;		if (columnIndex == 0 && (column == null || column.getOrderIndex () == 0)) {			Rectangle focusBounds = getFocusBounds ();			int fillWidth = 0;			if (column == null) {				fillWidth = focusBounds.width;			} else {				fillWidth = column.width - focusBounds.x;				if (parent.linesVisible) fillWidth--;			}			gc.fillRectangle (focusBounds.x, focusBounds.y, fillWidth, focusBounds.height);		} else {			int fillWidth = cellBounds.width;			if (parent.linesVisible) fillWidth--;			gc.fillRectangle (cellBounds.x, cellBounds.y + 1, fillWidth, cellBounds.height - 1);		}		gc.setBackground (oldBackground);	}	/* 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) {			Color oldBackground = gc.getBackground ();			gc.setBackground (display.getSystemColor (SWT.COLOR_LIST_SELECTION));			if (columnIndex == 0) {				Rectangle focusBounds = getFocusBounds ();				int fillWidth = focusBounds.width;				if (parent.columns.length < 2 || (parent.style & SWT.FULL_SELECTION) == 0) {					fillWidth -= 2;	/* space for right bound of focus rect */				}				if (fillWidth > 0) {					gc.fillRectangle (focusBounds.x + 1, focusBounds.y + 1, fillWidth, focusBounds.height - 2);				}			} else {				int fillWidth = column.width;				if (columnIndex == parent.columns.length - 1) {					fillWidth -= 2;		/* space for right bound of focus rect */				}				if (fillWidth > 0) {					gc.fillRectangle (column.getX (), y + 2, fillWidth, itemHeight - 3);				}			}			gc.setBackground (oldBackground);		}	}	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 */	gc.setClipping (		startX,		cellBounds.y + padding,		cellRightX - startX - padding,		cellBounds.height - (2 * padding));	/* 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) {		boolean fontChanged = false, foregroundChanged = false;		Font oldFont = gc.getFont ();		Font font = getFont (columnIndex);		if (!font.equals (oldFont)) {			gc.setFont (font);			fontChanged = true;		}		int fontHeight = getFontHeight (columnIndex);		Color oldForeground = gc.getForeground ();		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));				foregroundChanged = true;			}		} else {			Color foreground = getForeground (columnIndex);			if (!foreground.equals (oldForeground)) {				gc.setForeground (foreground);				foregroundChanged = true;			}		}		x = getTextX (columnIndex) + MARGIN_TEXT;		gc.drawString (text, x, y + (itemHeight - fontHeight) / 2, true);		if (foregroundChanged) gc.setForeground (oldForeground);		if (fontChanged) gc.setFont (oldFont);	}}