diff dwt/custom/TreeEditor.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/TreeEditor.d	Fri Jan 18 11:45:54 2008 +0100
+++ b/dwt/custom/TreeEditor.d	Fri Jan 18 17:00:39 2008 +0100
@@ -78,6 +78,7 @@
 *   });
 * </pre></code>
 */
+
 public class TreeEditor : ControlEditor {
     Tree tree;
     TreeItem item;
@@ -85,7 +86,7 @@
     ControlListener columnListener;
     TreeListener treeListener;
     Runnable timer;
-    static final int TIMEOUT = 1500;
+    static const int TIMEOUT = 1500;
 
 /**
 * Creates a TreeEditor for the specified Tree.
@@ -111,14 +112,17 @@
         }
     };
     treeListener = new class() TreeListener {
-        final Runnable runnable = new class() Runnable {
-            public void run() {
-                if (editor is null || editor.isDisposed()) return;
-                if (this.outer.tree.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.tree.isDisposed()) return;
+                    layout();
+                    editor.setVisible(true);
+                }
+            };
+        }
         public void treeCollapsed(TreeEvent e) {
             if (editor is null || editor.isDisposed ()) return;
             editor.setVisible(false);
@@ -170,7 +174,7 @@
     } else { // default is CENTER
         editorRect.x += (cell.width - editorRect.width)/2;
     }
-    // don't let the editor overlap with the +/- of the tree
+    // don't let the editor overlap with the + / - of the tree
     editorRect.x = Math.max(cell.x, editorRect.x);
 
     if (verticalAlignment is DWT.BOTTOM) {
@@ -318,4 +322,5 @@
     if (columnCount > 0 && (column < 0 || column >= columnCount)) return;
     super.layout();
 }
+
 }