protected void paint(Event event, Object element) {
		if (!isOwnerDrawEnabled())
			return;
		
		ViewerCell cell= getViewerCell(event, element);

		boolean applyColors= useColors(event);
		
		GC gc = event.gc;
		// remember colors to restore the GC later
		Color oldForeground = gc.getForeground();
		Color oldBackground = gc.getBackground();
		
		if (applyColors) {
			Color foreground= cell.getForeground();
			if (foreground != null) {
				gc.setForeground(foreground);
			}
			
			Color background= cell.getBackground();
			if (background != null) {
				gc.setBackground(background);
			}
		}
		Image image = cell.getImage();
		if (image != null) {
			Rectangle imageBounds = cell.getImageBounds();
			if (imageBounds != null) {
				Rectangle bounds = image.getBounds();
	
				// center the image in the given space
				int x = imageBounds.x
						+ Math.max(0, (imageBounds.width - bounds.width) / 2);
				int y = imageBounds.y
						+ Math.max(0, (imageBounds.height - bounds.height) / 2);
				gc.drawImage(image, x, y);
			}
		}

		Rectangle textBounds = cell.getTextBounds();
		if (textBounds != null) {
			TextLayout textLayout= getSharedTextLayout(event.display);
			// text layout already configured in measure(Event, Object)
			
			Rectangle layoutBounds = textLayout.getBounds();
	
			int x = textBounds.x;
			int y = textBounds.y
					+ Math.max(0, (textBounds.height - layoutBounds.height) / 2);
	
			textLayout.draw(gc, x, y);
		}

		if (drawFocus(event)) {
			Rectangle focusBounds = cell.getViewerRow().getBounds();
			gc.drawFocus(focusBounds.x, focusBounds.y, focusBounds.width + deltaOfLastMeasure,
					focusBounds.height);
		}
		
		if (applyColors) {
			gc.setForeground(oldForeground);
			gc.setBackground(oldBackground);
		}
	}