Пример #1
0
 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();
 }
Пример #2
0
  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);
          }
        });
  }
Пример #3
0
 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());
 }
Пример #5
0
 public void doCancelAction() {
   final ModuleWizardStep step = getCurrentStepObject();
   step.onStepLeaving();
   super.doCancelAction();
 }
Пример #6
0
 protected void doPreviousAction() {
   final ModuleWizardStep step = getCurrentStepObject();
   step.onStepLeaving();
   super.doPreviousAction();
 }
Пример #7
0
 protected void dispose() {
   for (ModuleWizardStep step : mySteps) {
     step.disposeUIResources();
   }
   super.dispose();
 }
 @Override
 protected void doNextAction() {
   if (!commitCurrentStep()) return;
   super.doNextAction();
 }