2 * Copyright (C) 2016 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.ui
;
11 import org
.eclipse
.jface
.util
.IPropertyChangeListener
;
12 import org
.eclipse
.jface
.wizard
.WizardPage
;
13 import org
.eclipse
.swt
.widgets
.Composite
;
14 import org
.eclipse
.ui
.forms
.widgets
.TableWrapLayout
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.LayoutConstants
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
25 public abstract class AbstractEntityCollectionElementWizardPage
extends WizardPage
implements
26 IPropertyChangeListener
{
28 protected CdmFormFactory formFactory
;
31 protected RootElement rootElement
;
33 protected AbstractEntityCollectionElementWizardPage(String pageName
, CdmFormFactory formFactory
) {
35 this.formFactory
= formFactory
;
42 public void createControl(Composite parent
) {
43 this.setPageComplete(false);
45 Composite control
= formFactory
.createComposite(parent
);
47 TableWrapLayout layout
= LayoutConstants
.LAYOUT(2, false);
48 layout
.horizontalSpacing
= 5;
49 control
.setLayout(layout
);
51 rootElement
= new RootElement(formFactory
, control
);
60 public void dispose() {
61 rootElement
.removeElements();
62 formFactory
.removePropertyChangeListener(this);