diff dwtx/ui/internal/forms/widgets/FormImages.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/ui/internal/forms/widgets/FormImages.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/ui/internal/forms/widgets/FormImages.d	Thu Aug 07 15:01:33 2008 +0200
@@ -21,7 +21,7 @@
 import dwt.widgets.Display;
 
 import dwt.dwthelper.utils;
-import tango.util.collection.HashMap;
+import dwtx.dwtxhelper.Collection;
 
 public class FormImages {
     private static FormImages instance;
@@ -32,8 +32,8 @@
         return instance;
     }
 
-    private HashMap!(Object,Object) images;
-    private HashMap!(Object,Object) ids;
+    private HashMap images;
+    private HashMap ids;
 
     private this() {
     }
@@ -179,8 +179,8 @@
             return result.getImage();
         }
         Image image = createGradient(display, color1, color2, realtheight, theight, marginHeight);
-        images.add(id, new ImageReference(image));
-        ids.add(image, id);
+        images.put(id, new ImageReference(image));
+        ids.put(image, id);
         return image;
     }
 
@@ -194,8 +194,8 @@
             return result.getImage();
         }
         Image image = createGradient(display, colors, percents, length, vertical, bg);
-        images.add(id, new ImageReference(image));
-        ids.add(image, id);
+        images.put(id, new ImageReference(image));
+        ids.put(image, id);
         return image;
     }
 
@@ -221,9 +221,9 @@
 
     private void checkHashMaps() {
         if (images is null)
-            images = new HashMap!(Object,Object);
+            images = new HashMap();
         if (ids is null)
-            ids = new HashMap!(Object,Object);
+            ids = new HashMap();
     }
 
     private void validateHashMaps() {