1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2016 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.taxeditor.ui;
|
11
|
|
12
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
13
|
import org.eclipse.jface.wizard.WizardPage;
|
14
|
import org.eclipse.swt.widgets.Composite;
|
15
|
import org.eclipse.ui.forms.widgets.TableWrapLayout;
|
16
|
|
17
|
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
|
18
|
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
|
19
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
20
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
21
|
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
|
22
|
import eu.etaxonomy.taxeditor.ui.element.RootElement;
|
23
|
import eu.etaxonomy.taxeditor.webapp.ICDMServerError;
|
24
|
|
25
|
/**
|
26
|
* @author pplitzner
|
27
|
* @date Mar 30, 2016
|
28
|
*
|
29
|
*/
|
30
|
public abstract class AbstractEntityCollectionElementWizardPage extends WizardPage implements
|
31
|
IPropertyChangeListener {
|
32
|
|
33
|
protected CdmFormFactory formFactory;
|
34
|
|
35
|
|
36
|
protected RootElement rootElement;
|
37
|
|
38
|
protected AbstractEntityCollectionElementWizardPage(String pageName) {
|
39
|
super(pageName);
|
40
|
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
* {@inheritDoc}
|
45
|
*/
|
46
|
@Override
|
47
|
public void createControl(Composite parent) {
|
48
|
this.setPageComplete(false);
|
49
|
|
50
|
Composite control = formFactory.createComposite(parent);
|
51
|
|
52
|
TableWrapLayout layout = LayoutConstants.LAYOUT(2, false);
|
53
|
layout.horizontalSpacing = 5;
|
54
|
control.setLayout(layout);
|
55
|
|
56
|
rootElement = new RootElement(formFactory, control);
|
57
|
|
58
|
|
59
|
setControl(control);
|
60
|
|
61
|
}
|
62
|
|
63
|
/** {@inheritDoc} */
|
64
|
@Override
|
65
|
public void dispose() {
|
66
|
rootElement.removeElements();
|
67
|
formFactory.removePropertyChangeListener(this);
|
68
|
|
69
|
super.dispose();
|
70
|
}
|
71
|
|
72
|
}
|