Skip to main content
summaryrefslogtreecommitdiffstats
blob: b5e45a8ba36b28d40db3caae29b2a5a8f0b0d20f (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
63
64
65
66
67
68
69
70
71
72
73
74
75
/*******************************************************************************
 * Copyright (c) 2006, 2008 IBM Corporation and others.
 * 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:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.ui.internal.intro.universal;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class WelcomeCustomizationPreferencePage extends PreferencePage implements IWorkbenchPreferencePage,
		IExecutableExtension {

    private CustomizationContentsArea contentsArea;

	public WelcomeCustomizationPreferencePage() {
	}

	public WelcomeCustomizationPreferencePage(String title) {
		super(title);
	}

	public WelcomeCustomizationPreferencePage(String title, ImageDescriptor image) {
		super(title, image);
	}
	
	private CustomizationContentsArea getContentsArea() {
		if (contentsArea == null) {
			contentsArea = new CustomizationContentsArea();
		}
		return contentsArea;
	}

	protected Control createContents(Composite parent) {
		getContentsArea().setShell(getShell());
		return getContentsArea().createContents(parent);
	}

	public void dispose() {
		getContentsArea().dispose();
		super.dispose();
	}

	public boolean performOk() {
		return getContentsArea().performOk();
	}

	protected void performDefaults() {
		getContentsArea().performDefaults();
	}


	public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
			throws CoreException {
	}

	public void init(IWorkbench workbench) {
	}
	
	public void setCurrentPage(String pageId) {
		getContentsArea().setCurrentPage(pageId);
	}
}

Back to the top