1 |
3257fc1d
|
Patrick Plitzner
|
/**
|
2 |
|
|
* Copyright (C) 2016 EDIT
|
3 |
|
|
* European Distributed Institute of Taxonomy
|
4 |
|
|
* http://www.e-taxonomy.eu
|
5 |
|
|
*
|
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.
|
8 |
|
|
*/
|
9 |
|
|
package eu.etaxonomy.taxeditor.ui;
|
10 |
|
|
|
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;
|
15 |
|
|
|
16 |
0d19c47e
|
Katja Luther
|
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
|
17 |
|
|
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
|
18 |
|
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
19 |
3257fc1d
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
20 |
|
|
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
|
21 |
|
|
import eu.etaxonomy.taxeditor.ui.element.RootElement;
|
22 |
0d19c47e
|
Katja Luther
|
import eu.etaxonomy.taxeditor.webapp.ICDMServerError;
|
23 |
3257fc1d
|
Patrick Plitzner
|
|
24 |
|
|
/**
|
25 |
|
|
* @author pplitzner
|
26 |
|
|
* @date Mar 30, 2016
|
27 |
|
|
*
|
28 |
|
|
*/
|
29 |
0d19c47e
|
Katja Luther
|
public abstract class AbstractEntityCollectionElementWizardPage extends WizardPage implements
|
30 |
3257fc1d
|
Patrick Plitzner
|
IPropertyChangeListener {
|
31 |
|
|
|
32 |
|
|
protected CdmFormFactory formFactory;
|
33 |
0d19c47e
|
Katja Luther
|
|
34 |
3257fc1d
|
Patrick Plitzner
|
|
35 |
|
|
protected RootElement rootElement;
|
36 |
|
|
|
37 |
|
|
protected AbstractEntityCollectionElementWizardPage(String pageName) {
|
38 |
|
|
super(pageName);
|
39 |
0d19c47e
|
Katja Luther
|
|
40 |
3257fc1d
|
Patrick Plitzner
|
}
|
41 |
|
|
|
42 |
|
|
/**
|
43 |
|
|
* {@inheritDoc}
|
44 |
|
|
*/
|
45 |
|
|
@Override
|
46 |
|
|
public void createControl(Composite parent) {
|
47 |
|
|
this.setPageComplete(false);
|
48 |
|
|
|
49 |
|
|
Composite control = formFactory.createComposite(parent);
|
50 |
|
|
|
51 |
|
|
TableWrapLayout layout = LayoutConstants.LAYOUT(2, false);
|
52 |
|
|
layout.horizontalSpacing = 5;
|
53 |
|
|
control.setLayout(layout);
|
54 |
|
|
|
55 |
|
|
rootElement = new RootElement(formFactory, control);
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
setControl(control);
|
59 |
|
|
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
/** {@inheritDoc} */
|
63 |
|
|
@Override
|
64 |
|
|
public void dispose() {
|
65 |
|
|
rootElement.removeElements();
|
66 |
|
|
formFactory.removePropertyChangeListener(this);
|
67 |
0d19c47e
|
Katja Luther
|
|
68 |
3257fc1d
|
Patrick Plitzner
|
super.dispose();
|
69 |
|
|
}
|
70 |
|
|
|
71 |
|
|
}
|