diff dwtx/ui/internal/forms/widgets/Paragraph.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 1088ca33d3e0
children
line wrap: on
line diff
--- a/dwtx/ui/internal/forms/widgets/Paragraph.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/ui/internal/forms/widgets/Paragraph.d	Thu Aug 07 15:01:33 2008 +0200
@@ -24,8 +24,7 @@
 import dwtx.ui.forms.HyperlinkSettings;
 
 import dwt.dwthelper.utils;
-import tango.util.collection.ArraySeq;
-import tango.util.collection.HashMap;
+import dwtx.dwtxhelper.Collection;
 import tango.io.model.IFile;
 
 import tango.text.Text;
@@ -37,10 +36,7 @@
 public class Paragraph {
     public static const String HTTP = "http://"; //$NON-NLS-1$
 
-    alias ArraySeq!(ParagraphSegment) TArraySeqParagraphSegment;
-    alias HashMap!(String,Object) Hashtable;
-
-    private TArraySeqParagraphSegment segments;
+    private Vector segments;
 
     private bool addVerticalSpace = true;
 
@@ -62,14 +58,14 @@
     public ParagraphSegment[] getSegments() {
         if (segments is null)
             return null;
-        return segments
-                .toArray();
+        return arraycast!(ParagraphSegment)(segments
+                .toArray());
     }
 
     public void addSegment(ParagraphSegment segment) {
         if (segments is null)
-            segments = new TArraySeqParagraphSegment;
-        segments.append(segment);
+            segments = new Vector;
+        segments.add(segment);
     }
 
     public void parseRegularText(String text, bool expandURLs, bool wrapAllowed,
@@ -133,7 +129,7 @@
         ParagraphSegment[] segments = getSegments();
         // compute heights
         Locator hloc = loc.create();
-        ArraySeq!(ArrayWrapperInt) heights = new ArraySeq!(ArrayWrapperInt);
+        ArrayList heights = new ArrayList();
         hloc.heights = heights;
         hloc.rowCounter = 0;
         int innerWidth = width - loc.marginWidth*2;