Revision 23783f7a
Added by Niels Hoffmann about 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/common/RefereneEntityDetailElement.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.taxeditor.ui.section.common; |
11 | 11 |
|
12 | 12 |
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase; |
13 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
13 | 14 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
14 | 15 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
15 | 16 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
16 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.SelectionType; |
|
17 | 17 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
18 |
import eu.etaxonomy.taxeditor.ui.selection.ReferenceSelectionElement;
|
|
18 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
|
|
19 | 19 |
|
20 | 20 |
/** |
21 | 21 |
* @author n.hoffmann |
... | ... | |
24 | 24 |
*/ |
25 | 25 |
public class RefereneEntityDetailElement extends AbstractCdmDetailElement<ReferencedEntityBase>{ |
26 | 26 |
|
27 |
private ReferenceSelectionElement selection_reference;
|
|
27 |
private EntitySelectionElement<Reference> selection_reference;
|
|
28 | 28 |
private TextWithLabelElement text_referenceDetail; |
29 | 29 |
|
30 | 30 |
public RefereneEntityDetailElement(CdmFormFactory formFactory, |
... | ... | |
35 | 35 |
@Override |
36 | 36 |
protected void createControls(ICdmFormElement formElement, |
37 | 37 |
ReferencedEntityBase entity, int style) { |
38 |
selection_reference = (ReferenceSelectionElement) formFactory
|
|
39 |
.createSelectionElement(SelectionType.REFERENCE,
|
|
38 |
selection_reference = formFactory |
|
39 |
.createSelectionElement(Reference.class,
|
|
40 | 40 |
getConversationHolder(), formElement, "Reference", |
41 | 41 |
entity.getCitation(), |
42 |
ReferenceSelectionElement.DEFAULT, style);
|
|
42 |
EntitySelectionElement.ALL, style);
|
|
43 | 43 |
text_referenceDetail = formFactory.createTextWithLabelElement( |
44 | 44 |
formElement, "Reference Detail", |
45 | 45 |
entity.getCitationMicroReference(), style); |
Also available in: Unified diff
Refactoring of selection elements. Additional minor refactoring. Fixed a bug with Translation Editor (#2752)