예제 #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);
  }
예제 #2
0
 /**
  * The <code>Wizard</code> implementation of this <code>IWizard</code> method creates all the
  * pages controls using <code>IDialogPage.createControl</code>. Subclasses should reimplement this
  * method if they want to delay creating one or more of the pages lazily. The framework ensures
  * that the contents of a page will be created before attempting to show it.
  */
 public void createPageControls(Composite pageContainer) {
   // the default behavior is to create all the pages controls
   for (int i = 0; i < pages.size(); i++) {
     IWizardPage page = (IWizardPage) pages.get(i);
     page.createControl(pageContainer);
     // page is responsible for ensuring the created control is
     // accessable
     // via getControl.
     Assert.isNotNull(page.getControl());
   }
 }