Revision 23783f7a
Added by Niels Hoffmann about 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceElement.java | ||
---|---|---|
14 | 14 |
import org.eclipse.swt.events.SelectionListener; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.model.common.DescriptionElementSource; |
17 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
|
17 | 18 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
18 | 19 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 20 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
20 | 21 |
import eu.etaxonomy.taxeditor.ui.element.IEntityElement; |
21 |
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator; |
|
22 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType; |
|
23 | 22 |
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement; |
24 |
import eu.etaxonomy.taxeditor.ui.selection.NameSelectionElement;
|
|
23 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
|
|
25 | 24 |
|
26 | 25 |
/** |
27 | 26 |
* <p> |
... | ... | |
37 | 36 |
AbstractOriginalSourceElement<DescriptionElementSource> implements |
38 | 37 |
IEntityElement<DescriptionElementSource> { |
39 | 38 |
|
40 |
private final SelectionArbitrator selectionArbitrator; |
|
41 |
|
|
42 |
private NameSelectionElement selection_name; |
|
39 |
private EntitySelectionElement<TaxonNameBase> selection_name; |
|
43 | 40 |
|
44 | 41 |
/** |
45 | 42 |
* <p> |
... | ... | |
65 | 62 |
AbstractFormSection formElement, DescriptionElementSource element, |
66 | 63 |
SelectionListener removeListener, int style) { |
67 | 64 |
super(cdmFormFactory, formElement, element, removeListener, style); |
68 |
selectionArbitrator = formFactory.createSelectionArbitrator(this);
|
|
65 |
formFactory.createSelectionArbitrator(this); |
|
69 | 66 |
} |
70 | 67 |
|
71 | 68 |
/* |
... | ... | |
78 | 75 |
@Override |
79 | 76 |
public void createControls(ICdmFormElement formElement, int style) { |
80 | 77 |
super.createControls(formElement, style); |
81 |
selection_name = (NameSelectionElement) formFactory
|
|
82 |
.createSelectionElement(SelectionType.NAME,
|
|
78 |
selection_name = formFactory |
|
79 |
.createSelectionElement(TaxonNameBase.class,
|
|
83 | 80 |
getConversationHolder(), formElement, "Name in Source", |
84 |
null, NameSelectionElement.DEFAULT, SWT.NULL);
|
|
81 |
null, EntitySelectionElement.ALL, SWT.NULL);
|
|
85 | 82 |
} |
86 | 83 |
|
87 | 84 |
/* |
Also available in: Unified diff
Refactoring of selection elements. Additional minor refactoring. Fixed a bug with Translation Editor (#2752)