Mercurial > projects > dwt-linux
diff dwt/custom/TableTreeEditor.d @ 103:0179b2e17eb2
Package custom compiles
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 18 Jan 2008 17:00:39 +0100 |
parents | 12e3e0e477cd |
children | 0f12f6bb9739 |
line wrap: on
line diff
--- a/dwt/custom/TableTreeEditor.d Fri Jan 18 11:45:54 2008 +0100 +++ b/dwt/custom/TableTreeEditor.d Fri Jan 18 17:00:39 2008 +0100 @@ -25,7 +25,7 @@ import dwt.custom.TableTree; import dwt.custom.TableTreeItem; - +import dwt.dwthelper.Runnable; /** * @@ -92,7 +92,6 @@ * @deprecated As of 3.1 use TreeEditor with Tree, TreeItem and TreeColumn */ public class TableTreeEditor : ControlEditor { - TableTree tableTree; TableTreeItem item; int column = -1; @@ -109,14 +108,17 @@ this.tableTree = tableTree; treeListener = new class() TreeListener { - final Runnable runnable = new class() Runnable { - public void run() { - if (editor is null || editor.isDisposed()) return; - if (this.outer.tableTree.isDisposed()) return; - layout(); - editor.setVisible(true); - } - }; + Runnable runnable; + this() { + runnable = new class() Runnable { + public void run() { + if (editor is null || editor.isDisposed()) return; + if (this.outer.outer.tableTree.isDisposed()) return; + layout(); + editor.setVisible(true); + } + }; + } public void treeCollapsed(TreeEvent e) { if (editor is null || editor.isDisposed ()) return; editor.setVisible(false); @@ -142,6 +144,7 @@ // To be consistent with older versions of DWT, grabVertical defaults to true grabVertical = true; } + Rectangle computeBounds () { if (item is null || column is -1 || item.isDisposed() || item.tableItem is null) return new Rectangle(0, 0, 0, 0); Rectangle cell = item.getBounds(column); @@ -254,6 +257,7 @@ * @param item the TableItem for the row of the cell being tracked by this editor * @param column the zero based index of the column of the cell being tracked by this editor */ +alias ControlEditor.setEditor setEditor; public void setEditor (Control editor, TableTreeItem item, int column) { setItem(item); setColumn(column); @@ -268,4 +272,5 @@ if (columnCount > 0 && (column < 0 || column >= columnCount)) return; super.layout(); } + }