/******************************************************************************* * <copyright> * * Copyright (c) 2005, 2010 SAP AG. * 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: * SAP AG - initial API, implementation and documentation * * </copyright> * *******************************************************************************/ package org.eclipse.graphiti.examples.common.ui; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; /** * The Class AbstractWizardPage. */ public abstract class AbstractWizardPage extends WizardPage implements ITextProvider { public AbstractWizardPage(String pageName, String title, ImageDescriptor titleImage) { super(pageName, title, titleImage); } protected AbstractWizardPage(String pageName) { super(pageName); } public void createControl(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); composite.setFont(parent.getFont()); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); createWizardContents(composite); setPageComplete(true); // Show description on opening setErrorMessage(null); setMessage(null); setControl(composite); } abstract protected void createWizardContents(Composite parent); }