Mercurial > projects > dwt-addons
diff dwtx/jface/wizard/Wizard.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 | ef4534de0cf9 |
children |
line wrap: on
line diff
--- a/dwtx/jface/wizard/Wizard.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/jface/wizard/Wizard.d Thu Aug 07 15:01:33 2008 +0200 @@ -16,7 +16,6 @@ import dwtx.jface.wizard.IWizardPage; import dwtx.jface.wizard.IWizardContainer; -import tango.util.collection.ArraySeq; import dwt.graphics.Image; import dwt.graphics.RGB; @@ -28,6 +27,7 @@ import dwtx.jface.resource.JFaceResources; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * An abstract base implementation of a wizard. A typical client subclasses @@ -76,7 +76,7 @@ /** * This wizard's list of pages (element type: <code>IWizardPage</code>). */ - private ArraySeq!(Object) pages; + private List pages; /** * Indicates whether this wizard needs a progress monitor. @@ -126,7 +126,7 @@ */ protected this() { //super(); - pages = new ArraySeq!(Object); + pages = new ArrayList(); defaultImageDescriptor = JFaceResources.getImageRegistry().getDescriptor(DEFAULT_IMAGE); } @@ -138,7 +138,7 @@ * the new page */ public void addPage(IWizardPage page) { - pages.append(cast(Object)page); + pages.add(cast(Object)page); page.setWizard(this); } @@ -232,7 +232,7 @@ * return the page that was added to this wizard after the given page. */ public IWizardPage getNextPage(IWizardPage page) { - int index = seqIndexOf(pages,cast(Object)page ); + int index = pages.indexOf( cast(Object)page ); if (index is pages.size() - 1 || index is -1) { // last page or page not found return null; @@ -273,7 +273,7 @@ * return the page that was added to this wizard before the given page. */ public IWizardPage getPreviousPage(IWizardPage page) { - int index = seqIndexOf(pages,cast(Object)page); + int index = pages.indexOf(cast(Object)page); if (index is 0 || index is -1) { // first page or page not found return null;