Revision 0caafa75
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/DerivedUnitTypeDesignationElement.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.ui.section.occurrence.association; |
11 | 10 |
|
12 | 11 |
import java.util.Set; |
... | ... | |
14 | 13 |
import org.eclipse.swt.events.SelectionListener; |
15 | 14 |
|
16 | 15 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
17 |
import eu.etaxonomy.cdm.model.term.TermType; |
|
18 | 16 |
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation; |
19 | 17 |
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus; |
20 | 18 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
19 |
import eu.etaxonomy.cdm.model.term.TermType; |
|
21 | 20 |
import eu.etaxonomy.taxeditor.ui.combo.term.TermComboElement; |
22 | 21 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
23 | 22 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
... | ... | |
34 | 33 |
|
35 | 34 |
private TermComboElement<SpecimenTypeDesignationStatus> combo_typeStatus; |
36 | 35 |
|
37 |
// private List<EntitySelectionElement<TaxonNameBase>> selectionTaxonNames; |
|
38 | 36 |
private ICdmFormElement parentFormElement; |
39 | 37 |
private int style; |
40 | 38 |
|
... | ... | |
57 | 55 |
else if(typifiedNames.size()>1){ |
58 | 56 |
formFactory.createLabel(getLayoutComposite(), "!!!!!!!!"); |
59 | 57 |
} |
60 |
|
|
58 |
|
|
61 | 59 |
SpecimenTypeDesignationStatus typeStatus = HibernateProxyHelper |
62 | 60 |
.deproxy(entity.getTypeStatus()); |
63 | 61 |
combo_typeStatus.setSelection(typeStatus); |
64 | 62 |
checkbox_notDesignated.setSelection(entity.isNotDesignated()); |
65 | 63 |
} |
66 |
|
|
67 |
// for (TaxonNameBase taxonNameBase : typifiedNames) { |
|
68 |
// EntitySelectionElement<TaxonNameBase> selectionElement = formFactory.createSelectionElement( |
|
69 |
// TaxonNameBase.class, getConversationHolder(), parentFormElement, "Scientific Name", null, |
|
70 |
// EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, style); |
|
71 |
// selectionElement.setEntity(taxonNameBase); |
|
72 |
// } |
|
73 |
|
|
74 |
|
|
75 | 64 |
} |
76 | 65 |
|
77 |
/** {@inheritDoc} */ |
|
78 | 66 |
@Override |
79 | 67 |
public void createControls(ICdmFormElement element, int style) { |
80 | 68 |
this.parentFormElement = element; |
81 | 69 |
this.style = style; |
82 | 70 |
|
83 | 71 |
selectionTaxonName = formFactory.createSelectionElement( |
84 |
TaxonName.class, //getConversationHolder(),
|
|
72 |
TaxonName.class, |
|
85 | 73 |
parentFormElement, "Scientific Name", null, |
86 | 74 |
EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, style); |
87 | 75 |
|
... | ... | |
94 | 82 |
} |
95 | 83 |
} |
96 | 84 |
|
97 |
/** {@inheritDoc} */ |
|
98 | 85 |
@Override |
99 | 86 |
public void handleEvent(Object eventSource) { |
100 | 87 |
if (eventSource == selectionTaxonName) { |
... | ... | |
104 | 91 |
} else if (eventSource == checkbox_notDesignated) { |
105 | 92 |
getEntity().setNotDesignated(checkbox_notDesignated.getSelection()); |
106 | 93 |
} |
107 |
// else if (eventSource == selection_reference) { |
|
108 |
// getEntity().setCitation(selection_reference.getSelection()); |
|
109 |
// } else if (eventSource == text_referenceDetail) { |
|
110 |
// getEntity().setCitationMicroReference( |
|
111 |
// text_referenceDetail.getText()); |
|
112 |
// } |
|
113 | 94 |
} |
114 |
|
|
115 |
} |
|
95 |
} |
Also available in: Unified diff
ref #10186 further remove ConversationHolder and cleanup