Mercurial > projects > dwt-addons
diff dwtx/ui/internal/forms/widgets/FormHeading.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 | e193036d82c9 |
children |
line wrap: on
line diff
--- a/dwtx/ui/internal/forms/widgets/FormHeading.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/ui/internal/forms/widgets/FormHeading.d Thu Aug 07 15:01:33 2008 +0200 @@ -58,7 +58,7 @@ import dwtx.ui.internal.forms.MessageManager; import dwt.dwthelper.utils; -import tango.util.collection.HashMap; +import dwtx.dwtxhelper.Collection; /** * Form header moved out of the form class. @@ -84,7 +84,7 @@ private Image gradientImage; - HashMap!(String,Object) colors; + Hashtable colors; private int flags; @@ -432,7 +432,7 @@ ensureControlExists(); if (needHyperlink()) { messageHyperlink.setText(newMessage); - messageHyperlink.setHref(new ArrayWrapperT!(IMessage)(messages)); + messageHyperlink.setHref(new ArrayWrapperObject(arraycast!(Object)(messages))); } else { messageLabel.setText(newMessage); } @@ -516,7 +516,7 @@ messageHyperlink = new Hyperlink(this.outer, DWT.NULL); messageHyperlink.setUnderlined(true); messageHyperlink.setText(message); - messageHyperlink.setHref(new ArrayWrapperT!(IMessage)(messages)); + messageHyperlink.setHref(new ArrayWrapperObject(arraycast!(Object)(messages))); Object[] llist = listeners.getListeners(); for (int i = 0; i < llist.length; i++) messageHyperlink @@ -525,7 +525,7 @@ messageToolTipManager.createToolTip(messageHyperlink, false); } else if (!messageHyperlink.getVisible()) { messageHyperlink.setText(message); - messageHyperlink.setHref(new ArrayWrapperT!(IMessage)(messages)); + messageHyperlink.setHref(new ArrayWrapperObject(arraycast!(Object)(messages))); messageHyperlink.setVisible(true); } } else { @@ -584,7 +584,7 @@ * the parent widget */ public this(Composite parent, int style) { - colors = new HashMap!(String,Object); + colors = new Hashtable(); toolbarCache = new SizeCache(); clientCache = new SizeCache(); messageCache = new SizeCache(); @@ -997,9 +997,9 @@ public void putColor(String key, Color color) { if (color is null) - colors.removeKey(key); + colors.remove(key); else - colors.add(key, color); + colors.put(key, color); } public Color getColor(String key) {