Mercurial > projects > dwt2
diff org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.d @ 85:6be48cf9f95c
Work on databinding
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 18 Apr 2009 13:54:50 +0200 |
parents | 0a55d2d5a946 |
children |
line wrap: on
line diff
--- a/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.d Sat Apr 18 09:25:29 2009 +0200 +++ b/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/TableUpdater.d Sat Apr 18 13:54:50 2009 +0200 @@ -9,6 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ module org.eclipse.jface.internal.databinding.provisional.swt.TableUpdater; +import org.eclipse.jface.internal.databinding.provisional.swt.SWTUtil; import java.lang.all; @@ -48,7 +49,7 @@ private bool dirty = false; - private IObservable[] dependencies = new IObservable[0]; + private IObservable[] dependencies; private final Object element; @@ -142,11 +143,12 @@ } - private PrivateInterface privateInterface = new PrivateInterface(); + private PrivateInterface privateInterface; private Table table; - private IListChangeListener listChangeListener = new class() IListChangeListener { + private IListChangeListener listChangeListener; + class ListChangeListener : IListChangeListener { public void handleListChange(ListChangeEvent event) { ListDiffEntry[] differences = event.diff.getDifferences(); for (int i = 0; i < differences.length; i++) { @@ -175,6 +177,8 @@ * @since 1.2 */ public this(Table table, IObservableList list) { +privateInterface = new PrivateInterface(); +listChangeListener = new ListChangeListener(); this.table = table; this.list = list; Assert.isLegal((table.getStyle() & SWT.VIRTUAL) !is 0, @@ -195,7 +199,7 @@ */ public void dispose() { table.removeDisposeListener(privateInterface); - table.removeListener(SWT.SetData, privateInterface); + table.removeListener(SWT.SetData, cast(Listener)privateInterface); list.removeListChangeListener(listChangeListener); table = null; list = null;