Revision 3257fc1d
Added by Patrick Plitzner about 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SynonymRelationshipWizardPage.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import org.eclipse.jface.util.IPropertyChangeListener; |
13 | 13 |
import org.eclipse.jface.util.PropertyChangeEvent; |
14 |
import org.eclipse.jface.wizard.WizardPage; |
|
15 | 14 |
import org.eclipse.swt.SWT; |
16 | 15 |
import org.eclipse.swt.widgets.Composite; |
17 | 16 |
|
... | ... | |
20 | 19 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationship; |
21 | 20 |
import eu.etaxonomy.cdm.model.taxon.SynonymRelationshipType; |
22 | 21 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
22 |
import eu.etaxonomy.taxeditor.ui.AbstractEntityCollectionElementWizardPage; |
|
23 | 23 |
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; |
24 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
|
25 | 24 |
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement; |
26 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
27 |
import eu.etaxonomy.taxeditor.ui.element.RootElement; |
|
28 | 25 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
29 | 26 |
|
30 | 27 |
/** |
... | ... | |
32 | 29 |
* @date 27.01.2014 |
33 | 30 |
* |
34 | 31 |
*/ |
35 |
public class SynonymRelationshipWizardPage extends WizardPage implements IPropertyChangeListener { |
|
32 |
public class SynonymRelationshipWizardPage extends AbstractEntityCollectionElementWizardPage implements IPropertyChangeListener {
|
|
36 | 33 |
|
37 |
private final CdmFormFactory formFactory; |
|
38 | 34 |
|
39 | 35 |
private EntitySelectionElement<Taxon> selection_relatedTo; |
40 | 36 |
|
... | ... | |
54 | 50 |
|
55 | 51 |
private Taxon taxon; |
56 | 52 |
|
57 |
private RootElement rootElement; |
|
58 | 53 |
|
59 | 54 |
/** |
60 | 55 |
* <p> |
... | ... | |
87 | 82 |
/** {@inheritDoc} */ |
88 | 83 |
@Override |
89 | 84 |
public void createControl(Composite parent) { |
90 |
this.setPageComplete(false); |
|
91 |
|
|
92 |
Composite control = formFactory.createComposite(parent); |
|
93 |
|
|
94 |
control.setLayout(LayoutConstants.LAYOUT(2, false)); |
|
95 |
|
|
96 |
rootElement = new RootElement(formFactory, control); |
|
85 |
super.createControl(parent); |
|
97 | 86 |
|
98 | 87 |
combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.SynonymRelationshipType, |
99 | 88 |
rootElement, "Synonym Relationship Type", null, SWT.NULL); |
... | ... | |
109 | 98 |
|
110 | 99 |
checkboxPartial = formFactory.createCheckbox(rootElement, "Partial Synonym", null, SWT.NULL); |
111 | 100 |
|
112 |
setControl(control); |
|
113 | 101 |
} |
114 | 102 |
|
115 | 103 |
/** |
... | ... | |
147 | 135 |
setPageComplete(complete); |
148 | 136 |
} |
149 | 137 |
|
150 |
/** {@inheritDoc} */ |
|
151 |
@Override |
|
152 |
public void dispose() { |
|
153 |
rootElement.removeElements(); |
|
154 |
formFactory.removePropertyChangeListener(this); |
|
155 |
super.dispose(); |
|
156 |
} |
|
157 | 138 |
} |
Also available in: Unified diff
Add space between label and textfield for all wizards #5436