Пример #1
0
 void releaseHandle() {
   super.releaseHandle();
   if (nsColumn != null) {
     nsColumn.headerCell().release();
     nsColumn.release();
   }
   nsColumn = null;
   parent = null;
 }
Пример #2
0
 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);
 }
Пример #3
0
 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);
 }
Пример #4
0
 void releaseWidget() {
   super.releaseWidget();
   if (parent.sortColumn == this) {
     parent.sortColumn = null;
   }
 }
Пример #5
0
 void deregister() {
   super.deregister();
   display.removeWidget(nsColumn.headerCell());
 }