/******************************************************************************* * <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.activiti.designer.eclipse.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 { /** * The Constructor. * * @param pageName * the page name * @param title * the title * @param titleImage * the title image */ public AbstractWizardPage(String pageName, String title, ImageDescriptor titleImage) { super(pageName, title, titleImage); } /** * Instantiates a new abstract wizard page. * * @param pageName * the page name */ protected AbstractWizardPage(String pageName) { super(pageName); } /* * (non-Javadoc) * * @see * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets * .Composite) */ 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); } /** * Creates the wizard contents. * * @param parent * the parent */ abstract protected void createWizardContents(Composite parent); }