Package de.innovationgate.eclipse.utils.ui

Source Code of de.innovationgate.eclipse.utils.ui.ValidatedMultiPageWizard

/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     Innovation Gate GmbH - initial API and implementation
******************************************************************************/
package de.innovationgate.eclipse.utils.ui;

import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;

public abstract class ValidatedMultiPageWizard extends Wizard implements INewWizard {

 
  @Override
  public boolean canFinish() {
    boolean result = super.canFinish();
    if (result) {
      IWizardPage current = getContainer().getCurrentPage();           
      IWizardPage last = getPages()[getPages().length - 1];
      if (current.equals(last)) {
        return true;
      }     
    }
    return false;
  }

}
TOP

Related Classes of de.innovationgate.eclipse.utils.ui.ValidatedMultiPageWizard

TOP
Copyright © 2018 www.massapi.com. 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.