diff dwtx/jface/preference/PreferenceNode.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 b3c8e32d406f
children
line wrap: on
line diff
--- a/dwtx/jface/preference/PreferenceNode.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/jface/preference/PreferenceNode.d	Thu Aug 07 15:01:33 2008 +0200
@@ -16,7 +16,6 @@
 import dwtx.jface.preference.IPreferencePage;
 
 
-import tango.util.collection.ArraySeq;
 // import java.util.List;
 
 import dwt.graphics.Image;
@@ -24,6 +23,7 @@
 import dwtx.jface.resource.ImageDescriptor;
 
 import dwt.dwthelper.utils;
+import dwtx.dwtxhelper.Collection;
 
 /**
  * A concrete implementation of a node in a preference dialog tree. This class
@@ -39,7 +39,7 @@
      * The list of subnodes (immediate children) of this node (element type:
      * <code>IPreferenceNode</code>).
      */
-    private ArraySeq!(Object) subNodes;
+    private List subNodes;
 
     /**
      * Name of a class that implements <code>IPreferencePage</code>, or
@@ -128,9 +128,9 @@
      */
     public void add(IPreferenceNode node) {
         if (subNodes is null) {
-            subNodes = new ArraySeq!(Object);
+            subNodes = new ArrayList();
         }
-        subNodes.append(cast(Object)node);
+        subNodes.add(cast(Object)node);
     }
 
     /**
@@ -274,9 +274,7 @@
         if (subNodes is null) {
             return false;
         }
-        bool res = subNodes.contains(cast(Object)node);
-        subNodes.remove(cast(Object)node);
-        return res;
+        return subNodes.remove(cast(Object)node);
     }
 
     /**