Ejemplo n.º 1
0
  public void showPage(String pageID) {
    if (false == pages.containsKey(pageID)) {
      Debug.out("MultipageWizard:: a page with this ID is not found ID:" + pageID);
      return;
    }

    IWizardPage page = (IWizardPage) pages.get(pageID);

    if (null != currentPage) {
      if (true == currentPage.getPageID().equals(page.getPageID())) {
        return;
      }
      currentPage.performAboutToBeHidden();
    }

    /*
     * Initializing the page if not done already
     */
    if (false == initializedPages.contains(page.getPageID())) {
      page.createControls(contentPanel);
      initializedPages.add(page.getPageID());
    }

    page.performAboutToBeShown();

    previousPage = currentPage;
    currentPage = page;
    contentStackLayout.topControl = page.getControl();

    update();

    contentPanel.layout(true);
  }
Ejemplo n.º 2
0
  public boolean addPage(IWizardPage page) {
    if (null == page) {
      return false;
    }
    if (true == pages.containsKey(page.getPageID())) {
      Debug.out("MultipageWizard:: a page with this ID already exists ID:" + page.getPageID());
      return false;
    }

    pages.put(page.getPageID(), page);

    if (true == page.isInitOnStartup()) {
      page.createControls(contentPanel);
      initializedPages.add(page.getPageID());
    }
    return true;
  }