}  int [] property = new int [1]; OS.GetDataBrowserSortProperty (handle, property); if (property [0] != 0) { for (int i = 0; i < columnCount; i++) { TableColumn column = columns [i]; if (property [0] == column.id) { column.postEvent (clickCount [0] == 2 ? SWT.DefaultSelection : SWT.Selection); break; } } OS.SetDataBrowserSortProperty (handle, 0);
int itemNotificationProc (int browser, int id, int message) {	if (message == OS.kDataBrowserUserStateChanged) {		short [] width = new short [1];		int [] position = new int [1];		TableColumn [] columns = getColumns ();		for (int i = 0; i < columnCount; i++) {			TableColumn column = columns [i];			if (!column.isDisposed ()) {				OS.GetDataBrowserTableViewNamedColumnWidth (handle, column.id, width);				if (width [0] != column.lastWidth) {					column.resized (width [0]);				}			}			if (!column.isDisposed ()) {				OS.GetDataBrowserTableViewColumnPosition (handle, column.id, position);				if (position [0] != column.lastPosition) {					column.lastPosition = position [0];					column.sendEvent (SWT.Move);				}			}		}		return OS.noErr;	}	int index = id - 1;	if (!(0 <= index && index < items.length)) return OS.noErr;	switch (message) {		case OS.kDataBrowserItemSelected:		case OS.kDataBrowserItemDeselected: {			TableItem item = _getItem (index);			wasSelected = true;			if (ignoreSelect) break;			int [] first = new int [1], last = new int [1];			OS.GetDataBrowserSelectionAnchor (handle, first, last);			boolean selected = false;			if ((style & SWT.MULTI) != 0) {				int modifiers = OS.GetCurrentEventKeyModifiers ();				if ((modifiers & OS.shiftKey) != 0) {					if (message == OS.kDataBrowserItemSelected) {						selected = first [0] == id || last [0] == id;					} else {						selected = id == anchorFirst || id == anchorLast;					}				} else {					if ((modifiers & OS.cmdKey) != 0) {						selected = true;					} else {						selected = first [0] == last [0];					}				}			} else {				selected = message == OS.kDataBrowserItemSelected;			}			if (selected) {				anchorFirst = first [0];				anchorLast = last [0];				Event event = new Event ();				event.item = item;				postEvent (SWT.Selection, event);			}			break;		}			case OS.kDataBrowserItemDoubleClicked: {			TableItem item = _getItem (index);			wasSelected = true;			Event event = new Event ();			event.item = item;			postEvent (SWT.DefaultSelection, event);			break;		}	}	return OS.noErr;}