Revision 23783f7a
Added by Niels Hoffmann about 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractReferencedEntityElement.java | ||
---|---|---|
14 | 14 |
import org.eclipse.swt.events.SelectionListener; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase; |
17 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
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.TextWithLabelElement; |
21 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType; |
|
22 | 22 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; |
23 |
import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
|
|
23 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
|
|
24 | 24 |
|
25 | 25 |
/** |
26 | 26 |
* <p> |
... | ... | |
34 | 34 |
public abstract class AbstractReferencedEntityElement<T extends ReferencedEntityBase> |
35 | 35 |
extends AbstractEntityCollectionElement<T> { |
36 | 36 |
|
37 |
protected ReferenceSelectionElement selection_reference;
|
|
37 |
protected EntitySelectionElement<Reference> selection_reference;
|
|
38 | 38 |
protected TextWithLabelElement text_referenceDetail; |
39 | 39 |
|
40 | 40 |
protected TextWithLabelElement text_originaleNameString; |
... | ... | |
77 | 77 |
/** {@inheritDoc} */ |
78 | 78 |
@Override |
79 | 79 |
public void createControls(ICdmFormElement formElement, int style) { |
80 |
selection_reference = (ReferenceSelectionElement) formFactory
|
|
81 |
.createSelectionElement(SelectionType.REFERENCE,
|
|
80 |
selection_reference = formFactory |
|
81 |
.createSelectionElement(Reference.class,
|
|
82 | 82 |
getConversationHolder(), formElement, "Reference", |
83 |
null, ReferenceSelectionElement.DEFAULT, style);
|
|
83 |
null, EntitySelectionElement.ALL, style);
|
|
84 | 84 |
text_referenceDetail = formFactory.createTextWithLabelElement( |
85 | 85 |
formElement, "Reference Detail", null, SWT.NULL); |
86 | 86 |
if (hasOriginalNameString) |
Also available in: Unified diff
Refactoring of selection elements. Additional minor refactoring. Fixed a bug with Translation Editor (#2752)