void releaseHandle() { super.releaseHandle(); if (nsColumn != null) { nsColumn.headerCell().release(); nsColumn.release(); } nsColumn = null; parent = null; }
public void setImage(Image image) { checkWidget(); if (image != null && image.isDisposed()) { error(SWT.ERROR_INVALID_ARGUMENT); } super.setImage(image); NSTableHeaderView headerView = ((NSOutlineView) parent.view).headerView(); if (headerView == null) return; int index = parent.indexOf(nsColumn); NSRect rect = headerView.headerRectOfColumn(index); headerView.setNeedsDisplayInRect(rect); }
public void setText(String string) { checkWidget(); if (string == null) error(SWT.ERROR_NULL_ARGUMENT); super.setText(string); char[] buffer = new char[text.length()]; text.getChars(0, buffer.length, buffer, 0); int length = fixMnemonic(buffer); displayText = new String(buffer, 0, length); NSString title = NSString.stringWith(displayText); nsColumn.headerCell().setTitle(title); NSTableHeaderView headerView = ((NSOutlineView) parent.view).headerView(); if (headerView == null) return; int index = parent.indexOf(nsColumn); NSRect rect = headerView.headerRectOfColumn(index); headerView.setNeedsDisplayInRect(rect); }
void releaseWidget() { super.releaseWidget(); if (parent.sortColumn == this) { parent.sortColumn = null; } }
void deregister() { super.deregister(); display.removeWidget(nsColumn.headerCell()); }