Improve dialogs.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / dialogs / CmsWizardDialog.java
index b3860f780ac112ce89aff4114a6894f6bef80e8d..93125be23478f406f023edb800b9d2ac68abd606 100644 (file)
@@ -2,7 +2,6 @@ package org.argeo.cms.ui.dialogs;
 
 import java.lang.reflect.InvocationTargetException;
 
-import org.argeo.cms.CmsException;
 import org.argeo.cms.CmsMsg;
 import org.argeo.cms.ui.util.CmsUiUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
@@ -24,6 +23,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 
+/** A wizard dialog based on {@link LightweightDialog}. */
 public class CmsWizardDialog extends LightweightDialog implements IWizardContainer2 {
        private static final long serialVersionUID = -2123153353654812154L;
 
@@ -47,7 +47,7 @@ public class CmsWizardDialog extends LightweightDialog implements IWizardContain
                wizard.addPages();
                currentPage = wizard.getStartingPage();
                if (currentPage == null)
-                       throw new CmsException("At least one wizard page is required");
+                       throw new IllegalArgumentException("At least one wizard page is required");
        }
 
        @Override
@@ -137,7 +137,7 @@ public class CmsWizardDialog extends LightweightDialog implements IWizardContain
                        }
                }
                if (index < 0)
-                       throw new CmsException("Cannot find index of wizard page " + page);
+                       throw new IllegalArgumentException("Cannot find index of wizard page " + page);
                pageBodies[index].moveAbove(pageBodies[currentPageIndex]);
 
                // // clear