Revision db81978c
Added by Alexander Oppermann over 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/PrimerGeneralDetailElement.java | ||
---|---|---|
16 | 16 |
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement; |
17 | 17 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
18 | 18 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
19 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
|
19 | 20 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
20 | 21 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
22 |
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection; |
|
21 | 23 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
22 | 24 |
|
23 | 25 |
/** |
... | ... | |
29 | 31 |
|
30 | 32 |
|
31 | 33 |
private TextWithLabelElement textPrimerName; |
32 |
//TODO we are using a basic text field which is backed up by a Sequence object modelwise.
|
|
34 |
// we are using a basic text field which is backed up by a Sequence object modelwise. |
|
33 | 35 |
// This is a bit of a overhead as we may just need the sequence string. This may change in future in both directions: |
34 | 36 |
// either extending this view to support the remaining fields of Sequence or by switching to the more basic SequenceString model element |
35 | 37 |
private TextWithLabelElement textPrimerSequence; |
36 | 38 |
private TermComboElement<DefinedTerm> comboMarker; |
37 |
/** |
|
38 |
* free text notes field is backed up by an annotation |
|
39 |
*/ |
|
40 |
private TextWithLabelElement textNotes; |
|
41 | 39 |
private EntitySelectionElement<Reference> selectionReference; |
42 | 40 |
|
43 | 41 |
/** |
... | ... | |
63 | 61 |
sequenceString = entity.getSequence().getString(); |
64 | 62 |
} |
65 | 63 |
textPrimerSequence = formFactory.createTextWithLabelElement(formElement, "Primer seq. 5'->3'", sequenceString, style); |
66 |
//TODO: marker |
|
67 |
//TODO: notes |
|
64 |
|
|
65 |
//TODO dnaMarker |
|
66 |
// comboMarker = formFactory.createDefinedTermComboElement(TermType.DnaMarker, formElement, "DNA Marker", entity.getDnaMarker(), style); |
|
68 | 67 |
|
69 | 68 |
selectionReference = formFactory |
70 | 69 |
.createSelectionElement(Reference.class, |
71 | 70 |
getConversationHolder(), formElement, "Reference", |
72 | 71 |
entity.getPublishedIn(), |
73 | 72 |
EntitySelectionElement.ALL, style); |
73 |
|
|
74 |
AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style); |
|
75 |
annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
76 |
annotationSection.setEntity(entity); |
|
74 | 77 |
} |
75 | 78 |
|
76 | 79 |
/* |
... | ... | |
85 | 88 |
if(eventSource==textPrimerName){ |
86 | 89 |
getEntity().setLabel(textPrimerName.getText()); |
87 | 90 |
} |
91 |
else if(eventSource==comboMarker){ |
|
92 |
//TODO dnaMarker |
|
93 |
// getEntity().setDnaMarker(comboMarker.getSelection()); |
|
94 |
} |
|
88 | 95 |
else if(eventSource==textPrimerSequence){ |
89 | 96 |
SequenceString sequenceString = getEntity().getSequence(); |
90 | 97 |
if(sequenceString==null){ |
Also available in: Unified diff
latest changes from trunk