Revision 23783f7a
Added by Niels Hoffmann about 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameRelationshipWizardPage.java | ||
---|---|---|
21 | 21 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
22 | 22 |
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; |
23 | 23 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
24 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
24 | 25 |
import eu.etaxonomy.taxeditor.ui.element.RootElement; |
25 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType; |
|
26 |
import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement; |
|
26 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
|
27 | 27 |
|
28 | 28 |
/** |
29 | 29 |
* <p> |
... | ... | |
39 | 39 |
|
40 | 40 |
private final CdmFormFactory formFactory; |
41 | 41 |
|
42 |
private NameSelectionElement selection_relatedTo;
|
|
42 |
private EntitySelectionElement<TaxonNameBase> selection_relatedTo;
|
|
43 | 43 |
|
44 | 44 |
private TermComboElement<NameRelationshipType> combo_relationshipType; |
45 | 45 |
|
46 |
private final NameRelationshipDetailSection callingSection; |
|
47 |
|
|
48 | 46 |
private final TaxonNameBase entity; |
49 | 47 |
|
50 | 48 |
private NameRelationshipType type; |
... | ... | |
68 | 66 |
super("NameRelationshipWizardPage"); |
69 | 67 |
setTitle("New Name Relationship"); |
70 | 68 |
setDescription(callingSection.getEntity().getTitleCache()); |
71 |
this.callingSection = callingSection; |
|
72 | 69 |
this.entity = callingSection.getEntity(); |
73 | 70 |
this.formFactory = callingSection.getFormFactory(); |
74 | 71 |
|
... | ... | |
89 | 86 |
|
90 | 87 |
Composite control = formFactory.createComposite(parent); |
91 | 88 |
|
92 |
control.setLayout(CdmFormFactory.LAYOUT(2, false));
|
|
89 |
control.setLayout(LayoutConstants.LAYOUT(2, false));
|
|
93 | 90 |
|
94 | 91 |
rootElement = new RootElement(formFactory, control); |
95 | 92 |
|
96 | 93 |
combo_relationshipType = formFactory.createTermComboElement(NameRelationshipType.class, |
97 | 94 |
rootElement, "Name Relationship Type", null, SWT.NULL); |
98 | 95 |
|
99 |
selection_relatedTo = (NameSelectionElement) formFactory
|
|
100 |
.createSelectionElement(SelectionType.NAME,
|
|
96 |
selection_relatedTo = formFactory |
|
97 |
.createSelectionElement(TaxonNameBase.class,
|
|
101 | 98 |
((NameRelationshipWizard) getWizard()) |
102 | 99 |
.getConversationHolder(), rootElement, |
103 |
"Related to", null, NameSelectionElement.DEFAULT,
|
|
100 |
"Related to", null, EntitySelectionElement.ALL,
|
|
104 | 101 |
SWT.NULL); |
105 | 102 |
|
106 | 103 |
setControl(control); |
Also available in: Unified diff
Refactoring of selection elements. Additional minor refactoring. Fixed a bug with Translation Editor (#2752)