Color chevronBorder = single ? getSelectionForeground() : getForeground();
void drawChevron(GC gc) {	if (chevronRect.width == 0 || chevronRect.height == 0) return;	// draw chevron (10x7)	FontData fd = getFont().getFontData()[0];	fd.setHeight(7);	Font f = new Font(getDisplay(), fd);	int fHeight = f.getFontData()[0].getHeight() * getDisplay().getDPI().y / 72;	int indent = Math.max(2, (chevronRect.height - fHeight - 4) /2);	int x = chevronRect.x + 2;	int y = chevronRect.y + indent;	int count;	if (single) {		count = selectedIndex == -1 ? items.length : items.length - 1;	} else {		int lastIndex = getLastIndex();		count = Math.max(0, items.length - (lastIndex - firstIndex + 1));	}	switch (chevronImageState) {		case NORMAL: {			Color chevronBorder = single ? getSelectionForeground() : getForeground();			gc.setForeground(chevronBorder);			gc.drawLine(x,y,     x+2,y+2);			gc.drawLine(x+2,y+2, x,y+4);			gc.drawLine(x+1,y,   x+3,y+2);			gc.drawLine(x+3,y+2, x+1,y+4);			gc.drawLine(x+4,y,   x+6,y+2);			gc.drawLine(x+6,y+2, x+5,y+4);			gc.drawLine(x+5,y,   x+7,y+2);			gc.drawLine(x+7,y+2, x+4,y+4);			gc.setFont(f);			gc.drawString(String.valueOf(count), x+7, y+4, true);			break;		}		case HOT: {			Display display = getDisplay();			gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));			gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);			gc.setForeground(borderColor);			gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);			gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));			gc.drawLine(x,y,     x+2,y+2);			gc.drawLine(x+2,y+2, x,y+4);			gc.drawLine(x+1,y,   x+3,y+2);			gc.drawLine(x+3,y+2, x+1,y+4);			gc.drawLine(x+4,y,   x+6,y+2);			gc.drawLine(x+6,y+2, x+5,y+4);			gc.drawLine(x+5,y,   x+7,y+2);			gc.drawLine(x+7,y+2, x+4,y+4);			gc.setFont(f);			gc.drawString(String.valueOf(count), x+7, y+4, true);			break;		}		case SELECTED: {			Display display = getDisplay();			gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));			gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);			gc.setForeground(borderColor);			gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);			gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));			gc.drawLine(x+1,y+1, x+3,y+3);			gc.drawLine(x+3,y+3, x+1,y+5);			gc.drawLine(x+2,y+1, x+4,y+3);			gc.drawLine(x+4,y+3, x+2,y+5);			gc.drawLine(x+5,y+1, x+7,y+3);			gc.drawLine(x+7,y+3, x+6,y+5);			gc.drawLine(x+6,y+1, x+8,y+3);			gc.drawLine(x+8,y+3, x+5,y+5);			gc.setFont(f);			gc.drawString(String.valueOf(count), x+8, y+5, true);			break;		}	}	f.dispose();}