Package org.beryl.gui

Examples of org.beryl.gui.WizardPageAdapter


  public WizardTest() throws GUIException {
    dataModel = new MapDataModel();
    wizard = (Wizard) constructWidget("WizardTest", dataModel);
    wizard.addWizardListener(this);

    wizard.getPage("page1").setAdapter(new WizardPageAdapter() {
      public boolean isPageReady(WizardPage page) {
        String value = (String) page.getDataModel().getValue("testValue");
        return (value != null) && !value.equals("");
      }
    });
View Full Code Here


  }

  private void next() {
    if (currentPage < totalPages - 1) {
      WizardPage current = (WizardPage) pages.get(currentPage);
      WizardPageAdapter wpAdapter = current.getAdapter();
      if (wpAdapter != null)
        wpAdapter.preparePage(current);
      if (wpAdapter == null || wpAdapter.finalizePage(current)) {
        do {
          current = (WizardPage) pages.get(++currentPage);
        } while (!current.isEnabled());
        if (current.getAdapter() != null)
          current.getAdapter().preparePage(current);
        updateButtons();
        updatePanel();
      }
    } else {
      WizardPage current = (WizardPage) pages.get(currentPage);
      WizardPageAdapter wpAdapter = current.getAdapter();
      if (wpAdapter == null || wpAdapter.finalizePage(current)) {
        fireFinish();
      }
    }
  }
View Full Code Here

    layout.show(componentPanel, page.getName());
  }

  public void updateButtons() {
    WizardPage page = (WizardPage) pages.get(currentPage);
    WizardPageAdapter wpAdapter = page.getAdapter();

    if (page != null) {
      if (wpAdapter != null)
        nextButton.setEnabled(wpAdapter.isPageReady(page));
      else
        nextButton.setEnabled(true);
      if (currentPage < (totalPages - 1)) {
        nextButton.setText(InternationalizationManager.getString("xmlgui.wizard.next"));
      } else {
View Full Code Here

TOP

Related Classes of org.beryl.gui.WizardPageAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.