package de.uka.ipd.sdq.beagle.gui;

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.widgets.Shell;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

/**
 * The class setting up and controlling the wizard allowing the user to configure Beagle’s
 * behaviour during the analysis.
 * 
 * @author Christoph Michelbach
 */
public class BeagleAnalysisWizard extends Wizard {

	/**
	 * The constructor of this class.
	 */
	public BeagleAnalysisWizard() {
		super();
		setNeedsProgressMonitor(true);
	}

	@Override
	public String getWindowTitle() {
		return "Beagle Analysis";
	}

	@Override
	public void addPages() {
		final List<WizardPage> wizardPages = new LinkedList<WizardPage>();
		wizardPages.add(new SelectionOverviewWizardPage());
		wizardPages.add(new TimeoutWizardPage());
		final Iterator<WizardPage> iterator = wizardPages.iterator();

		while (iterator.hasNext()) {
			addPage(iterator.next());
		}
	}

	@Override
	public boolean performFinish() {
		// open dialog
		// TODO use timeout.getTimeout() when launching the analysis
		final String dialogTitle = "Beagle Analysis is Running";
		final String dialogMessage = "Beagle Analysis is running.";
		final String[] buttonLabels = {"Abort", "Pause"};
		final MessageDialog dialog = new MessageDialog(new Shell(), dialogTitle, null, dialogMessage,
			MessageDialog.INFORMATION, buttonLabels, 0);
		final int buttonClick = dialog.open();

		if (buttonClick == 0) {
			System.out.println("User clicked 'Abort'.");
		}

		if (buttonClick == 1) {
			System.out.println("User clicked 'Pause'.");
		}

		return true;
	}
}

package de.uka.ipd.sdq.beagle.gui;

import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

/**
 * The class setting up and controlling the wizard allowing the user to configure Beagle’s
 * behaviour during the analysis.
 * 
 * @author Christoph Michelbach
 */
public class BeagleAnalysisWizard extends Wizard {

	/**
	 * The {@link ActionListener} which will be executed when the wizard finishes.
	 */
	private ActionListener wizardFinished;

	/**
	 * Constructs a new {@link BeagleAnalysisWizard} which runs {@code wizardFinished}
	 * when it finihes.
	 * 
	 * @param wizardFinished The {@link ActionListener} which will be executed when the
	 *            wizard finishes.
	 */
	public BeagleAnalysisWizard(final ActionListener wizardFinished) {
		super();
		this.wizardFinished = wizardFinished;
		setNeedsProgressMonitor(true);
	}

	@Override
	public String getWindowTitle() {
		return "Beagle Analysis";
	}

	@Override
	public void addPages() {
		final List<WizardPage> wizardPages = new LinkedList<WizardPage>();
		wizardPages.add(new SelectionOverviewWizardPage());
		wizardPages.add(new TimeoutWizardPage());
		final Iterator<WizardPage> iterator = wizardPages.iterator();

		while (iterator.hasNext()) {
			addPage(iterator.next());
		}
	}

	@Override
	public boolean performFinish() {
		this.wizardFinished.actionPerformed(new ActionEvent(this, 0, "wizard finished"));
		return true;
	}
}

Put action behavior into `BeagleAnalysisWizard`.