KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > editor > product > SplashPage


1 /*******************************************************************************
2  * Copyright (c) 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.pde.internal.ui.editor.product;
13
14 import org.eclipse.pde.internal.ui.IHelpContextIds;
15 import org.eclipse.pde.internal.ui.IPDEUIConstants;
16 import org.eclipse.pde.internal.ui.PDEPlugin;
17 import org.eclipse.pde.internal.ui.PDEPluginImages;
18 import org.eclipse.pde.internal.ui.PDEUIMessages;
19 import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
20 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
21 import org.eclipse.swt.widgets.Composite;
22 import org.eclipse.ui.PlatformUI;
23 import org.eclipse.ui.forms.IManagedForm;
24 import org.eclipse.ui.forms.editor.FormEditor;
25 import org.eclipse.ui.forms.widgets.FormToolkit;
26 import org.eclipse.ui.forms.widgets.ScrolledForm;
27
28 /**
29  * SplashPage
30  *
31  */

32 public class SplashPage extends PDEFormPage {
33
34     public static final String JavaDoc PAGE_ID = "splash"; //$NON-NLS-1$
35

36     /**
37      * @param editor
38      */

39     public SplashPage(FormEditor editor) {
40         super(editor, PAGE_ID, PDEUIMessages.SplashPage_splashName);
41     }
42
43     /* (non-Javadoc)
44      * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
45      */

46     protected String JavaDoc getHelpResource() {
47         // TODO: MP: SPLASH: Update help document reference in header
48
return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/splash.htm"; //$NON-NLS-1$
49
}
50
51     /* (non-Javadoc)
52      * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
53      */

54     protected void createFormContent(IManagedForm managedForm) {
55         super.createFormContent(managedForm);
56         ScrolledForm form = managedForm.getForm();
57         FormToolkit toolkit = managedForm.getToolkit();
58         form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_IMAGE_APPLICATION));
59         form.setText(PDEUIMessages.SplashPage_splashName);
60         fillBody(managedForm, toolkit);
61         // TODO: MP: SPLASH: Update help context ID
62
PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.BRANDING_PAGE);
63     }
64     
65     /**
66      * @param managedForm
67      * @param toolkit
68      */

69     private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
70         Composite body = managedForm.getForm().getBody();
71         body.setLayout(FormLayoutFactory.createFormGridLayout(false, 1));
72         // Sections
73
managedForm.addPart(new SplashLocationSection(this, body));
74         managedForm.addPart(new SplashConfigurationSection(this, body));
75     }
76     
77 }
78
Popular Tags