@Override
		public void handleEvent(Event event) {
			switch(event.type) {		
				case SWT.MeasureItem: {
					TreeItem item = (TreeItem)event.item;
					String text = getText(item, event.index);
					Point size = event.gc.textExtent(text);
					event.width = size.x;
					event.height = Math.max(event.height, size.y);
					break;
				}
				case SWT.PaintItem: {
					TreeItem item = (TreeItem)event.item;
					String text = getText(item, event.index);
					Point size = event.gc.textExtent(text);					
					int offset2 = event.index == 0 ? Math.max(0, (event.height - size.y) / 2) : 0;
					event.gc.drawText(text, event.x, event.y + offset2, true);
					break;
				}
				case SWT.EraseItem: {	
					event.detail &= ~SWT.FOREGROUND;
					break;
				}
			}
		}