Revision 49a64920
Added by Cherian Mathew over 10 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/SpecimenCollectionDetailElement.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.swt.events.SelectionListener; |
14 | 14 |
|
15 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnitBase; |
|
16 |
import eu.etaxonomy.cdm.model.occurrence.Specimen; |
|
15 |
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit; |
|
17 | 16 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
18 | 17 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 18 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
30 | 29 |
* @version 1.0 |
31 | 30 |
*/ |
32 | 31 |
public class SpecimenCollectionDetailElement extends |
33 |
AbstractEntityCollectionElement<Specimen> {
|
|
32 |
AbstractEntityCollectionElement<DerivedUnit> {
|
|
34 | 33 |
|
35 |
private EntitySelectionElement<DerivedUnitBase> selection_derivedUnit;
|
|
34 |
private EntitySelectionElement<DerivedUnit> selection_derivedUnit; |
|
36 | 35 |
|
37 | 36 |
/** |
38 | 37 |
* <p> |
... | ... | |
53 | 52 |
* a int. |
54 | 53 |
*/ |
55 | 54 |
public SpecimenCollectionDetailElement(CdmFormFactory formFactory, |
56 |
AbstractFormSection section, Specimen entity,
|
|
55 |
AbstractFormSection section, DerivedUnit entity,
|
|
57 | 56 |
SelectionListener removeListener, int style) { |
58 | 57 |
super(formFactory, section, entity, removeListener, null, style); |
59 | 58 |
} |
... | ... | |
67 | 66 |
*/ |
68 | 67 |
/** {@inheritDoc} */ |
69 | 68 |
@Override |
70 |
public void setEntity(Specimen entity) {
|
|
69 |
public void setEntity(DerivedUnit entity) {
|
|
71 | 70 |
this.entity = entity; |
72 | 71 |
selection_derivedUnit.setEntity(entity); |
73 | 72 |
} |
... | ... | |
83 | 82 |
@Override |
84 | 83 |
public void createControls(ICdmFormElement element, int style) { |
85 | 84 |
selection_derivedUnit = formFactory |
86 |
.createSelectionElement(DerivedUnitBase.class,
|
|
85 |
.createSelectionElement(DerivedUnit.class, |
|
87 | 86 |
getConversationHolder(), element, "Derived Unit", null, |
88 | 87 |
EntitySelectionElement.EDITABLE | EntitySelectionElement.SELECTABLE, style); |
89 | 88 |
} |
... | ... | |
99 | 98 |
@Override |
100 | 99 |
public void handleEvent(Object eventSource) { |
101 | 100 |
if (eventSource == selection_derivedUnit) { |
102 |
this.setEntity((Specimen) selection_derivedUnit.getSelection());
|
|
101 |
this.setEntity((DerivedUnit) selection_derivedUnit.getSelection());
|
|
103 | 102 |
} |
104 | 103 |
} |
105 | 104 |
|
Also available in: Unified diff
Aligning Editor with 3.3 model changes. First phase commit which updates only the classes.
Branch not compilable at the moment.