setLastIndex(index);
if (setItemSize()) changed = true; if (setItemLocation()) changed = true; if (!item.showing) { if (priority[idx] >= priority[0]) { int maxWidth = getRightItemEdge() - borderLeft; if (!single && !simple) maxWidth -= curveWidth - 2*curveIndent; int width = items[priority[idx]].width; while (idx > 1) { width += items[priority[idx-1]].width; if (width > maxWidth) break; idx--; } } int[] newPriority = new int[priority.length]; System.arraycopy(priority, idx, newPriority, 0, priority.length - idx); System.arraycopy(priority, 0, newPriority, priority.length - idx, idx); priority = newPriority; if (setItemLocation()) changed = true; }
public void showItem (CTabItem item) {	checkWidget();	if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (item.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	if (item.isShowing()) return;	Point size = getSize();	int index = indexOf(item);	if (size.x <= borderLeft + borderRight || index < firstIndex) {		setFirstIndex(index);	} else {		setLastIndex(index);	}}