import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
private EntitySelectionElement<AgentBase> selectionAmplificationStaff;
private EntitySelectionElement<Primer> selectionPrimerFW;
private EntitySelectionElement<Primer> selectionPrimerRW;
-// private CheckboxElement checkBoxAmplificationSuccess;
-// private TextWithLabelElement textAmplificationSuccessDetails;
-// private TermComboElement<DefinedTerm> comboAmplificationMaterialOrMethod;
-
-// private NumberWithLabelElement numberGelVoltage;
-// private NumberWithLabelElement numberGelConcentration;
-// private NumberWithLabelElement numberGelRunningTime;
-// private TextWithLabelElement textLadderUsed;
-
-// private TermComboElement<DefinedTerm> comboPurificationMaterialOrMethod;
-
/**
* @param formFactory
textDesignation = formFactory.createTextWithLabelElement(formElement, "Designation", entity.getDescription(), style);
textDesignation.setEnabled(false);
//TODO institution
+// selectionInstitution = formFactory.createSelectionElement(Institution.class, getConversationHolder(), formElement, "Institution", entity.getInstitution(), EntitySelectionElement.ALL, style);
selectionAmplificationStaff = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Amplification staff", entity.getActor(), EntitySelectionElement.ALL, style);
dateAmplification = formFactory.createTimePeriodElement(formElement, "Date", entity.getTimeperiod(), style);
comboMarker = formFactory.createDefinedTermComboElement(TermType.DnaMarker, formElement, "DNA Marker", entity.getDnaMarker(), style);
selectionPrimerFW = formFactory.createSelectionElement(Primer.class, getConversationHolder(), formElement, "Primer FW", entity.getForwardPrimer(), EntitySelectionElement.ALL, style);
selectionPrimerRW = formFactory.createSelectionElement(Primer.class, getConversationHolder(), formElement, "Primer RW", entity.getReversePrimer(), EntitySelectionElement.ALL, style);
-// checkBoxAmplificationSuccess = formFactory.createCheckbox(formElement, "Amplification Success", entity.getSuccessful(), style);
-// textAmplificationSuccessDetails = formFactory.createTextWithLabelElement(formElement, "Ampl. Success Details", entity.getSuccessText(), style);
-// comboAmplificationMaterialOrMethod = formFactory.createTermComboElement(DefinedTerm.class, formElement, "Ampl. Mat. & Meth.", entity.get, style)
-// numberGelVoltage = formFactory.createNumberTextWithLabelElement(formElement, "Gel Voltage (V)", entity.getElectrophoresisVoltage(), style);
-// numberGelConcentration = formFactory.createNumberTextWithLabelElement(formElement, "Gel Concentration", entity.getGelConcentration(), style);
-// numberGelRunningTime = formFactory.createNumberTextWithLabelElement(formElement, "Gel Ruinning Time (Min)", entity.getGelRunningTime(), style);
-// textLadderUsed = formFactory.createTextWithLabelElement(formElement, "Ladder Used", entity.getLadderUsed(), style);
-// comboPurificationMaterialOrMethod = formFactory.createDefinedTermComboElement(TermType.MaterialOrMethod, formElement, "Purification Mat. & Meth.",
-// entity.getPurification()==null?null:entity.getPurification().getDefinedMaterialOrMethod(), style);
- //TODO notes
+
+ AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style);
+ annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ annotationSection.setEntity(entity);
+
updateDesignationText();
}
updateDesignationText();
}
else if(eventSource==selectionInstitution){
- //TODO implement
+ //TODO institution
+// getEntity().setInstitution(selectionInstitution.getSelection());
updateDesignationText();
}
else if(eventSource==selectionPrimerFW){
else if(eventSource==selectionPrimerRW){
getEntity().setReversePrimer(selectionPrimerRW.getSelection());
}
-// else if(eventSource==checkBoxAmplificationSuccess){
-// getEntity().setSuccessful(checkBoxAmplificationSuccess.getSelection());
-// }
-// else if(eventSource==textAmplificationSuccessDetails){
-// getEntity().setSuccessText(textAmplificationSuccessDetails.getText());
-// }
-// else if(eventSource==comboAmplificationMaterialOrMethod){
-//
-// }
-// else if(eventSource==numberGelVoltage){
-// getEntity().setElectrophoresisVoltage(numberGelVoltage.getDouble());
-// }
-// else if(eventSource==numberGelConcentration){
-// getEntity().setGelConcentration(numberGelConcentration.getDouble());
-// }
-// else if(eventSource==numberGelRunningTime){
-// getEntity().setGelRunningTime(numberGelRunningTime.getDouble());
-// }
-// else if(eventSource==textLadderUsed){
-// getEntity().setLadderUsed(textLadderUsed.getText());
-// }
-// else if(eventSource==comboPurificationMaterialOrMethod){
-// MaterialOrMethodEvent purification = getEntity().getPurification();
-// if(purification==null){
-// purification = MaterialOrMethodEvent.NewInstance();
-// getEntity().setPurification(purification);
-// }
-// purification.setDefinedMaterialOrMethod(comboPurificationMaterialOrMethod.getSelection());
-// }
}
}
\ No newline at end of file