1 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 32 public class SplashPage extends PDEFormPage { 33 34 public static final String PAGE_ID = "splash"; 36 39 public SplashPage(FormEditor editor) { 40 super(editor, PAGE_ID, PDEUIMessages.SplashPage_splashName); 41 } 42 43 46 protected String getHelpResource() { 47 return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/splash.htm"; } 50 51 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 PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.BRANDING_PAGE); 63 } 64 65 69 private void fillBody(IManagedForm managedForm, FormToolkit toolkit) { 70 Composite body = managedForm.getForm().getBody(); 71 body.setLayout(FormLayoutFactory.createFormGridLayout(false, 1)); 72 managedForm.addPart(new SplashLocationSection(this, body)); 74 managedForm.addPart(new SplashConfigurationSection(this, body)); 75 } 76 77 } 78 | Popular Tags |