KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2005, 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 package org.eclipse.pde.internal.ui.editor.product;
12
13 import org.eclipse.pde.internal.ui.IHelpContextIds;
14 import org.eclipse.pde.internal.ui.IPDEUIConstants;
15 import org.eclipse.pde.internal.ui.PDEPlugin;
16 import org.eclipse.pde.internal.ui.PDEPluginImages;
17 import org.eclipse.pde.internal.ui.PDEUIMessages;
18 import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
19 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
20 import org.eclipse.swt.widgets.Composite;
21 import org.eclipse.ui.PlatformUI;
22 import org.eclipse.ui.forms.IManagedForm;
23 import org.eclipse.ui.forms.editor.FormEditor;
24 import org.eclipse.ui.forms.widgets.FormToolkit;
25 import org.eclipse.ui.forms.widgets.ScrolledForm;
26
27
28 public class LaunchingPage extends PDEFormPage {
29     
30     public static final String JavaDoc PAGE_ID = "launcher"; //$NON-NLS-1$
31

32     public LaunchingPage(FormEditor editor) {
33         super(editor, PAGE_ID, PDEUIMessages.LauncherPage_title);
34     }
35     
36     /* (non-Javadoc)
37      * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
38      */

39     protected String JavaDoc getHelpResource() {
40         return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/launching.htm"; //$NON-NLS-1$
41
}
42     
43     /* (non-Javadoc)
44      * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
45      */

46     protected void createFormContent(IManagedForm managedForm) {
47         super.createFormContent(managedForm);
48         ScrolledForm form = managedForm.getForm();
49         FormToolkit toolkit = managedForm.getToolkit();
50         form.setImage(PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PRODUCT_LAUNCHING));
51         form.setText(PDEUIMessages.LauncherPage_title);
52         fillBody(managedForm, toolkit);
53         PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.BRANDING_PAGE);
54     }
55     
56     private void fillBody(IManagedForm managedForm, FormToolkit toolkit) {
57         Composite body = managedForm.getForm().getBody();
58         body.setLayout(FormLayoutFactory.createFormGridLayout(false, 2));
59
60         managedForm.addPart(new JRESection(this, body));
61         managedForm.addPart(new LauncherSection(this, body));
62         managedForm.addPart(new ArgumentsSection(this, body));
63     }
64
65
66 }
67
Popular Tags