diff dwtx/jface/viewers/TableTreeViewer.d @ 104:04b47443bb01

Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections. These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 15:01:33 +0200
parents 7ffeace6c47f
children
line wrap: on
line diff
--- a/dwtx/jface/viewers/TableTreeViewer.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/jface/viewers/TableTreeViewer.d	Thu Aug 07 15:01:33 2008 +0200
@@ -27,7 +27,6 @@
 import dwtx.jface.viewers.ITableLabelProvider;
 import dwtx.jface.viewers.ViewerLabel;
 
-import tango.util.collection.model.SeqView;
 
 import dwt.DWT;
 import dwt.custom.TableTree;
@@ -50,6 +49,7 @@
 import dwt.widgets.Widget;
 
 import dwt.dwthelper.utils;
+import dwtx.dwtxhelper.Collection;
 
 /**
  * A concrete viewer based on a DWT <code>TableTree</code> control.
@@ -323,11 +323,7 @@
          * @return the array of column properties
          */
         public Object[] getColumnProperties() {
-            Object[] res;
-            foreach( str; columnProperties ){
-                res ~= new ArrayWrapperString( str );
-            }
-            return res;
+            return stringcast( columnProperties );
         }
 
         /**
@@ -875,8 +871,9 @@
     /*
      * (non-Javadoc) Method declared in AbstractTreeViewer.
      */
-    protected override void setSelection(SeqView!(Item) items) {
-        getTableTree().setSelection(cast(TableTreeItem[]) items.toArray);
+    protected override void setSelection(List items) {
+        TableTreeItem[] newItems = arraycast!(TableTreeItem)(items.toArray());
+        getTableTree().setSelection(newItems);
     }
 
     /*