Mercurial > projects > dwt-addons
diff dwtx/ui/forms/widgets/ScrolledPageBook.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 | 5d489b9f966c |
children | c3583c6ec027 |
line wrap: on
line diff
--- a/dwtx/ui/forms/widgets/ScrolledPageBook.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/ui/forms/widgets/ScrolledPageBook.d Thu Aug 07 15:01:33 2008 +0200 @@ -26,7 +26,8 @@ import dwtx.ui.internal.forms.widgets.WrappedPageBook; import dwt.dwthelper.utils; -import tango.util.collection.HashMap; +import dwtx.dwtxhelper.Collection; + /** * ScrolledPageBook is a class that is capable of stacking several composites * (pages), while showing one at a time. The content is scrolled if there is @@ -36,7 +37,7 @@ */ public class ScrolledPageBook : SharedScrolledComposite { private WrappedPageBook pageBook; - private HashMap!(Object,Object) pages; + private Hashtable pages; private Composite emptyPage; private Control currentPage; /** @@ -60,7 +61,7 @@ super(parent, style); pageBook = new WrappedPageBook(this, DWT.NULL); setContent(pageBook); - pages = new HashMap!(Object,Object); + pages = new Hashtable(); setExpandHorizontal(true); setExpandVertical(true); this.addListener(DWT.Traverse, dgListener( (Event e) { @@ -110,7 +111,7 @@ */ public Composite createPage(Object key) { Composite page = createPage(); - pages.add(key, page); + pages.put(key, page); return page; } /** @@ -133,7 +134,7 @@ * @see #getContainer */ public void registerPage(Object key, Control page) { - pages.add(key, page); + pages.put(key, page); } /** * Removes the page under the provided key from the page book. Does nothing