for (int i=0; i<items.length; i++) { if (items [i] != null && items [i].parentItem == item) { OS.SetDataBrowserItemDataBooleanValue (itemData, true); break; }
TreeItem item = _getItem (id, true); if (item.itemCount > 0) { OS.SetDataBrowserItemDataBooleanValue (itemData, true);
int itemDataProc (int browser, int id, int property, int itemData, int setValue) {	int index = id - 1;	if (!(0 <= index && index < items.length)) return OS.noErr;	TreeItem item = items [index];	switch (property) {		case CHECK_COLUMN_ID: {			if (setValue != 0) {				item.checked = !item.checked;				if (item.checked && item.grayed) {					OS.SetDataBrowserItemDataButtonValue (itemData, (short) OS.kThemeButtonMixed);				} else {					int theData = item.checked ? OS.kThemeButtonOn : OS.kThemeButtonOff;					OS.SetDataBrowserItemDataButtonValue (itemData, (short) theData);				}				Event event = new Event ();				event.item = item;				event.detail = SWT.CHECK;				postEvent (SWT.Selection, event);				/*				* Bug in the Macintosh. When the height of the row is smaller than the				* check box, the tail of the check mark draws outside of the item part				* bounds. This means it will not be redrawn when the item is unckeched.				* The fix is to redraw the area.				*/				if (!item.checked) item.redraw(Tree.CHECK_COLUMN_ID);			} else {				int theData = OS.kThemeButtonOff;				if (item.checked) theData = item.grayed ? OS.kThemeButtonMixed : OS.kThemeButtonOn;				OS.SetDataBrowserItemDataButtonValue (itemData, (short) theData);			}			break;		}		case OS.kDataBrowserItemIsContainerProperty: {			for (int i=0; i<items.length; i++) {				if (items [i] != null && items [i].parentItem == item) {					OS.SetDataBrowserItemDataBooleanValue (itemData, true);					break;				}			}			break;		}	}	return OS.noErr;}