Project

General

Profile

Download (3.91 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
 * Copyright (C) 2014 EDIT
4
 * European Distributed Institute of Taxonomy
5
 * http://www.e-taxonomy.eu
6
 *
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10
package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
11

    
12
import eu.etaxonomy.cdm.model.agent.AgentBase;
13
import eu.etaxonomy.cdm.model.common.DefinedTerm;
14
import eu.etaxonomy.cdm.model.molecular.SingleRead;
15
import eu.etaxonomy.cdm.model.reference.Reference;
16
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
17
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
18
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
19
import eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement;
20
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
21
import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
22
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
23
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
24

    
25
/**
26
 * @author pplitzner
27
 * @date 06.01.2014
28
 *
29
 */
30
public class SingleReadGeneralDetailElement extends AbstractCdmDetailElement<SingleRead> {
31

    
32

    
33
    private TimePeriodElement dateElement;
34
    private EntitySelectionElement<AgentBase> selectionSequencingStaff;
35
    private TermComboElement<DefinedTerm> comboMaterialOrMethod;
36
    private TextWithLabelElement textChromatogram;
37
    private NumberWithLabelElement textReadLength;
38
    private TextWithLabelElement textEditedSequence;
39
    private TextWithLabelElement textPrimerName;
40
    private TextWithLabelElement textPrimerSequence;
41
    private EntitySelectionElement<Reference> selectionReference;
42

    
43
    /**
44
     * @param formFactory
45
     * @param formElement
46
     */
47
    public SingleReadGeneralDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
48
        super(formFactory, formElement);
49
    }
50

    
51
    /*
52
     * (non-Javadoc)
53
     *
54
     * @see
55
     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
56
     * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, java.lang.Object, int)
57
     */
58
    @Override
59
    protected void createControls(ICdmFormElement formElement, SingleRead entity, int style) {
60

    
61
        dateElement = formFactory.createTimePeriodElement(formElement, "Sequencing Date", entity.getDateSequenced(), style);
62
        selectionSequencingStaff = formFactory
63
                .createSelectionElement(AgentBase.class,
64
                        getConversationHolder(), formElement, "Sequencing Staff",
65
                        null,
66
                        EntitySelectionElement.ALL, style);
67
//        comboMaterialOrMethod = formFactory.createTermComboElement(DefinedTerm.class, formElement, "Mat. & Meth.", entity.getMaterialOrMethod().getDefinedMaterialOrMethod(), style);
68
        textChromatogram = formFactory.createTextWithLabelElement(formElement, "Read Chromatogram", "XXX", style);
69
//        textReadLength = formFactory.createNumberTextWithLabelElement(formElement, "Read Length", entity.getSequence().getLength(), style);
70
//        textEditedSequence = formFactory.createTextWithLabelElement(formElement, "Edited Sequence 5'->3'", entity.getSequenceString(), style);
71
//        textPrimerName = formFactory.createTextWithLabelElement(formElement, "Primer Name", entity.getPrimer().getLabel(), style);
72
//        textPrimerSequence = formFactory.createTextWithLabelElement(formElement, "Primer seq. 5'->3'", entity.getPrimer().getSequence().getSequenceString(), style);
73

    
74
        selectionReference = formFactory
75
                .createSelectionElement(Reference.class,
76
                        getConversationHolder(), formElement, "Reference",
77
                        null,
78
                        EntitySelectionElement.ALL, style);
79
    }
80

    
81
    /*
82
     * (non-Javadoc)
83
     *
84
     * @see
85
     * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
86
     * .lang.Object)
87
     */
88
    @Override
89
    public void handleEvent(Object eventSource) {
90
    }
91

    
92
}
(14-14/17)