column_id = column.id; idCount = 0; DataBrowserListViewHeaderDesc desc = new DataBrowserListViewHeaderDesc (); desc.version = OS.kDataBrowserListViewLatestHeaderDesc; short [] width = new short [1]; OS.GetDataBrowserTableViewNamedColumnWidth (handle, column_id, width); desc.minimumWidth = desc.maximumWidth = width [0]; int str = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, new char [0], 0); desc.titleString = str; OS.SetDataBrowserListViewHeaderDesc (handle, column_id, desc); OS.CFRelease (str);
void destroyItem (TableColumn column) {	int index = 0;	while (index < columnCount) {		if (columns [index] == column) break;		index++;	}	//TODO - optimize	for (int i=0; i<itemCount; i++) {		TableItem item = items [i];		for (int j=index; j<columnCount-1; j++) {			// TODO - don't call setter			item.setText (j, item.getText (j + 1));			item.setImage (j, item.getImage (j + 1));		}		if (columnCount > 1) {			item.setText (columnCount - 1, "");			item.setImage (columnCount - 1, null);			Color [] cellBackground = items [i].cellBackground;			if (cellBackground != null) {					Color [] temp = new Color [columnCount - 1];				System.arraycopy (cellBackground, 0, temp, 0, index);				System.arraycopy (cellBackground, index + 1, temp, index, columnCount - 1 - index);				items [i].cellBackground = temp;			}			Color [] cellForeground = items [i].cellForeground;			if (cellForeground != null) {				Color [] temp = new Color [columnCount - 1];				System.arraycopy (cellForeground, 0, temp, 0, index);				System.arraycopy (cellForeground, index + 1, temp, index, columnCount - 1 - index);				items [i].cellForeground = temp;			}		}	}	if (columnCount == 1) {		//TODO - reassign COLUMN_ID when last column deleted	} else {		if (OS.RemoveDataBrowserTableViewColumn (handle, column.id) != OS.noErr) {			error (SWT.ERROR_ITEM_NOT_REMOVED);		}	}	System.arraycopy (columns, index + 1, columns, index, --columnCount - index);	columns [columnCount] = null;}