1 11 package org.eclipse.ui.internal.forms; 12 13 import org.eclipse.jface.wizard.WizardPage; 14 import org.eclipse.swt.widgets.Composite; 15 import org.eclipse.ui.forms.widgets.*; 16 17 23 public abstract class FormWizardPage extends WizardPage { 24 protected FormToolkit toolkit; 25 protected WizardForm managedForm; 26 27 public FormWizardPage(String id, FormToolkit toolkit) { 28 super(id); 29 this.toolkit = toolkit; 30 } 31 32 36 public final void createControl(Composite parent) { 37 ScrolledForm form = toolkit.createScrolledForm(parent); 38 form.setExpandHorizontal(true); 39 form.setExpandVertical(true); 40 managedForm = new WizardForm(this, toolkit, form); 41 createFormContents(form.getBody()); 42 setControl(form); 43 } 44 45 public void dispose() { 46 managedForm.dispose(); 47 super.dispose(); 48 } 49 50 protected abstract void createFormContents(Composite form); 51 } 52 | Popular Tags |