index = (selectedIndex + offset + count) % count;
if (!mru) { index = (selectedIndex + offset + count) % count; } else { int[] visible = new int[items.length]; int idx = 0; int current = -1; for (int i = 0; i < items.length; i++) { if (items[i].showing) { if (i == selectedIndex) current = idx; visible [idx++] = i; } } if (current + offset >= 0 && current + offset < idx){ index = visible [current + offset]; } else { if (showChevron) { CTabFolderEvent e = new CTabFolderEvent(this); e.widget = this; e.time = event.time; e.x = chevronRect.x; e.y = chevronRect.y; e.width = chevronRect.width; e.height = chevronRect.height; e.doit = true; for (int i = 0; i < folderListeners.length; i++) { folderListeners[i].showList(e); } if (e.doit && !isDisposed()) { showList(chevronRect); } } return true; } }
boolean onPageTraversal(Event event) {	int count = items.length;	if (count == 0) return false;	int index = selectedIndex; 	if (index  == -1) {		index = 0;	} else {		int offset = (event.detail == SWT.TRAVERSE_PAGE_NEXT) ? 1 : -1;		index = (selectedIndex + offset + count) % count;	}	setSelection (index, true);	return true;}