protected final void doOKAction() {
   int idx = getCurrentStep();
   try {
     do {
       final ModuleWizardStep step = mySteps.get(idx);
       if (step != getCurrentStepObject()) {
         step.updateStep();
       }
       if (!commitStepData(step)) {
         return;
       }
       step.onStepLeaving();
       try {
         step._commit(true);
       } catch (CommitStepException e) {
         String message = e.getMessage();
         if (message != null) {
           Messages.showErrorDialog(getCurrentStepComponent(), message);
         }
         return;
       }
       if (!isLastStep(idx)) {
         idx = getNextStep(idx);
       } else {
         break;
       }
     } while (true);
   } finally {
     myCurrentStep = idx;
     updateStep();
   }
   super.doOKAction();
 }
  protected void updateStep() {
    final ModuleWizardStep currentStep = getCurrentStepObject();
    currentStep.updateStep();

    super.updateStep();

    updateButtons();

    final JButton nextButton = getNextButton();
    final JButton finishButton = getFinishButton();
    final boolean isLastStep = isLastStep(getCurrentStep());

    SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            if (!isShowing()) {
              return;
            }
            final JComponent preferredFocusedComponent = currentStep.getPreferredFocusedComponent();
            if (preferredFocusedComponent != null) {
              preferredFocusedComponent.requestFocus();
            } else {
              if (isLastStep) {
                finishButton.requestFocus();
              } else {
                nextButton.requestFocus();
              }
            }
            getRootPane().setDefaultButton(isLastStep ? finishButton : nextButton);
          }
        });
  }
 protected void doNextAction() {
   final ModuleWizardStep step = getCurrentStepObject();
   if (!commitStepData(step)) {
     return;
   }
   step.onStepLeaving();
   super.doNextAction();
 }
 @Override
 protected void updateStep() {
   super.updateStep();
   final int step = getCurrentStep();
   SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           getRootPane()
               .setDefaultButton(getNextStep(step) != step ? getNextButton() : getFinishButton());
         }
       });
   ExportSignedPackageWizardStep currentStep = mySteps.get(step);
   getFinishButton().setEnabled(currentStep.canFinish());
 }
 public void doCancelAction() {
   final ModuleWizardStep step = getCurrentStepObject();
   step.onStepLeaving();
   super.doCancelAction();
 }
 protected void doPreviousAction() {
   final ModuleWizardStep step = getCurrentStepObject();
   step.onStepLeaving();
   super.doPreviousAction();
 }
 protected void dispose() {
   for (ModuleWizardStep step : mySteps) {
     step.disposeUIResources();
   }
   super.dispose();
 }
 @Override
 protected void doNextAction() {
   if (!commitCurrentStep()) return;
   super.doNextAction();
 }