package eu.etaxonomy.taxeditor.ui.forms;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
*/
/** {@inheritDoc} */
public void createControl(Composite parent) {
- Composite control = formFactory.createComposite(parent);
+ ScrolledForm scrolledForm = formFactory.createScrolledForm(parent);
+ GridLayout layout = new GridLayout();
+ scrolledForm.getBody().setLayout(layout);
+
+ Composite control = formFactory.createComposite(scrolledForm.getBody());
+ control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
control.setLayout(CdmFormFactory.LAYOUT(2, false));
WizardPageRootElement rootElement = new WizardPageRootElement(formFactory, control, getConversationHolder());
rootElement.setBackground(bgColor);
control.setBackground(bgColor);
+ scrolledForm.setBackground(bgColor);
- setControl(control);
+ setControl(scrolledForm);
}
/**
* @param rootElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
* @return a {@link eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement} object.
*/
- public abstract AbstractCdmDetailElement createElement(ICdmFormElement rootElement);
+ public abstract AbstractCdmDetailElement<T> createElement(ICdmFormElement rootElement);
private class WizardPageRootElement extends RootElement implements IConversationEnabled{