Beispiel #1
0
  protected void updateCanFinish() {
    boolean canFinish = true;

    for (WizardPage wizardPage : history) {
      if (!wizardPage.completeProperty().getValue()) canFinish = false;
    }

    WizardPage wizardPage = getCurrentPage();
    while (wizardPage != null) {
      if (!wizardPage.completeProperty().getValue()) canFinish = false;

      wizardPage = wizardPage.getNextPage();
    }

    this.canFinish.set(canFinish);
  }
Beispiel #2
0
  public void registerWizardPage(final WizardPage wizardPage) {
    assertNotNull("wizardPage", wizardPage);

    if (wizardPage.getWizard() != null) wizardPage.setWizard(this);

    if (knownPages.containsKey(wizardPage)) return;

    wizardPage.completeProperty().addListener(updateCanFinishInvalidationListener);
    knownPages.put(wizardPage, null);
    wizardPage.setVisible(false);
    getChildren().add(0, wizardPage);
  }