Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e87b4326a0d9279c073af4d56063140275efcad2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2007, 2011 Symbian Software Limited and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 * Andrew Ferguson (Symbian) - Initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.ui.templateengine;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;

/**
 * Implementation of standard behaviours intended to be subclassed by clients.
 * @since 4.0.2
 */
public abstract class AbstractWizardDataPage extends WizardPage implements IWizardDataPage {
	protected IWizardPage next;

	/**
	* Creates a new wizard page with the given name, and
	* with no title or image.
	*
	* @param pageName the name of the page
	*/
	public AbstractWizardDataPage(String pageName) {
		super(pageName);
	}

	/**
	 * Creates a new wizard page with the given name, title, and image.
	 *
	 * @param pageName the name of the page
	 * @param title the title for this wizard page,
	 *   or <code>null</code> if none
	 * @param imageDescriptor the image descriptor for the title of this wizard page,
	 *   or <code>null</code> if none
	 */
	public AbstractWizardDataPage(String pageName, String title, ImageDescriptor imageDescriptor) {
		super(pageName, title, imageDescriptor);
	}

	@Override
	public void setNextPage(IWizardPage next) {
		this.next = next;
	}

	@Override
	public IWizardPage getNextPage() {
		if (next != null) {
			return next;
		}
		return super.getNextPage();
	}
}

Back to the top