diff jface/snippets/Snippet026TreeViewerTabEditing.d @ 143:42c3056512ba

redirect the jface examples to the new collection wrappers
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 22:21:50 +0200
parents 2b4e94cafb85
children
line wrap: on
line diff
--- a/jface/snippets/Snippet026TreeViewerTabEditing.d	Thu Aug 07 17:23:25 2008 +0200
+++ b/jface/snippets/Snippet026TreeViewerTabEditing.d	Thu Aug 07 22:21:50 2008 +0200
@@ -8,7 +8,7 @@
  * Contributors:
  *     Tom Schindl - initial API and implementation
  * Port to the D programming language:
- *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ ) 
+ *     yidabu at gmail dot com  ( D China http://www.d-programming-language-china.org/ )
  *******************************************************************************/
 
 module jface.snippets.Snippet026TreeViewerTabEditing;
@@ -39,9 +39,11 @@
 import dwt.widgets.Shell;
 
 import dwt.dwthelper.utils;
+import dwtx.dwtxhelper.Collection;
 
 import tango.util.Convert;
-import tango.util.container.LinkedList;
+
+version(JIVE) import jive.stacktrace;
 
 
 void main(String[] args) {
@@ -61,12 +63,11 @@
 
 /**
  * A simple TreeViewer to demonstrate usage
- * 
+ *
  * @author Tom Schindl <tom.schindl@bestsolution.at>
- * 
+ *
  */
 public class Snippet026TreeViewerTabEditing {
-    alias  LinkedList!(MyModel) ArrayList;    
     public this(Shell shell) {
         Button b = new Button(shell,DWT.PUSH);
         b.setText("Remove column");
@@ -81,15 +82,15 @@
                 this.v = v_;
             }
             public void widgetDefaultSelected(SelectionEvent e) {
-                
+
             }
 
             public void widgetSelected(SelectionEvent e) {
                 v.getTree().getColumn(1).dispose();
             }
-            
+
         });
-                 
+
         TreeViewerFocusCellManager focusCellManager = new TreeViewerFocusCellManager(v,new FocusCellOwnerDrawHighlighter(v));
         ColumnViewerEditorActivationStrategy actSupport = new class(v) ColumnViewerEditorActivationStrategy {
             this(ColumnViewer v_)
@@ -104,11 +105,11 @@
                         || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
             }
         };
-        
+
         TreeViewerEditor.create(v, focusCellManager, actSupport, ColumnViewerEditor.TABBING_HORIZONTAL
                 | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR
                 | ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.KEYBOARD_ACTIVATION);
-        
+
         final TextCellEditor textCellEditor = new TextCellEditor(v.getTree());
 
         TreeViewerColumn column = new TreeViewerColumn(v, DWT.NONE);
@@ -178,7 +179,7 @@
                 v.update(element, null);
             }
         });
-        
+
         column = new TreeViewerColumn(v, DWT.NONE);
         column.getColumn().setWidth(200);
         column.getColumn().setMoveable(true);
@@ -211,7 +212,7 @@
                 v.update(element, null);
             }
         });
-        
+
         v.setContentProvider(new MyContentProvider());
 
         v.setInput(createModel());
@@ -276,7 +277,7 @@
         public this(int counter, MyModel parent) {
             this.parent = parent;
             this.counter = counter;
-            child = new ArrayList();            
+            child = new ArrayList();
         }
 
         public String toString() {