int index = tabs_in_order.indexOf(tab) - 1; if (index < 0) index = tabs_in_order.size() - 1; setTab((GraphicsTab)tabs_in_order.get(index));
GC gc; Rectangle rect = canvas.getClientArea(); Image buffer = null; if (dbItem.getSelection()) { buffer = new Image(canvas.getDisplay(), rect); gc = new GC(buffer); } else { gc = event.gc; } paintBackground(gc, rect); GraphicsTab tab = getTab(); if (tab != null) tab.paint(gc, rect.width, rect.height); if (gc != event.gc) gc.dispose(); if (buffer != null) { event.gc.drawImage(buffer, 0, 0); buffer.dispose(); }
		public void handleEvent(Event event) {			int index = tabs_in_order.indexOf(tab) - 1;			if (index < 0)				index = tabs_in_order.size() - 1;			setTab((GraphicsTab)tabs_in_order.get(index));		}