Display display = getDisplay(); display.asyncExec(new Runnable() { public void run() { if (table.isDisposed()) return; table.removeListener(SWT.FocusIn, tableListener); table.removeListener(SWT.MouseDown, tableListener); if (column != -1) { TableColumn col = table.getColumn(column); col.removeListener(SWT.Dispose, disposeColumnListener); col.removeListener(SWT.Move, resizeListener); col.removeListener(SWT.Resize, resizeListener); } if (row != -1) { table.getItem(row).removeListener(SWT.Dispose, disposeItemListener); } ScrollBar hBar = table.getHorizontalBar(); if (hBar != null) { hBar.removeListener(SWT.Selection, resizeListener); } ScrollBar vBar = table.getVerticalBar(); if (vBar != null) { vBar.removeListener(SWT.Selection, resizeListener); } } });
table.removeListener(SWT.FocusIn, tableListener); table.removeListener(SWT.MouseDown, tableListener); if (column != null) { column.removeListener(SWT.Dispose, disposeColumnListener); column.removeListener(SWT.Move, resizeListener); column.removeListener(SWT.Resize, resizeListener); column = null; } if (row != null) { row.removeListener(SWT.Dispose, disposeItemListener); row = null; } ScrollBar hBar = table.getHorizontalBar(); if (hBar != null) { hBar.removeListener(SWT.Selection, resizeListener); } ScrollBar vBar = table.getVerticalBar(); if (vBar != null) { vBar.removeListener(SWT.Selection, resizeListener); }
void dispose(Event event) {	Display display = getDisplay();	display.asyncExec(new Runnable() {		public void run() {			if (table.isDisposed()) return;			table.removeListener(SWT.FocusIn, tableListener);			table.removeListener(SWT.MouseDown, tableListener);			if (column != -1) {				TableColumn col = table.getColumn(column);				col.removeListener(SWT.Dispose, disposeColumnListener);				col.removeListener(SWT.Move, resizeListener);				col.removeListener(SWT.Resize, resizeListener);			}			if (row != -1) {				table.getItem(row).removeListener(SWT.Dispose, disposeItemListener);			}			ScrollBar hBar = table.getHorizontalBar();			if (hBar != null) {				hBar.removeListener(SWT.Selection, resizeListener);			}			ScrollBar vBar = table.getVerticalBar();			if (vBar != null) {				vBar.removeListener(SWT.Selection, resizeListener);			}		}	});}