import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.molecular.Amplification;
-import eu.etaxonomy.cdm.model.molecular.Cloning;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
*/
@Override
protected void createControls(ICdmFormElement formElement, Amplification entity, int style) {
- Cloning cloning = entity.getCloning();
- textCloningStrain = formFactory.createTextWithLabelElement(formElement, "Cloning Strain", cloning==null?"":cloning.getStrain(), style);
- date = formFactory.createTimePeriodElement(formElement, "Cloning Date", cloning==null?null:cloning.getTimeperiod(), style);
- selectionCloningStaff = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Cloning Staff", cloning==null?null:cloning.getActor(), EntitySelectionElement.ALL, style);
- comboCloningMaterialOrMethod = formFactory.createDefinedTermComboElement(TermType.MaterialOrMethod, formElement, "Cloning Mat. & Meth.", cloning==null?null:cloning.getDefinedMaterialOrMethod(), style);
+// Cloning cloning = entity.getCloning();
+// textCloningStrain = formFactory.createTextWithLabelElement(formElement, "Cloning Strain", cloning==null?"":cloning.getStrain(), style);
+// date = formFactory.createTimePeriodElement(formElement, "Cloning Date", cloning==null?null:cloning.getTimeperiod(), style);
+// selectionCloningStaff = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), formElement, "Cloning Staff", cloning==null?null:cloning.getActor(), EntitySelectionElement.ALL, style);
+// comboCloningMaterialOrMethod = formFactory.createDefinedTermComboElement(TermType.MaterialOrMethod, formElement, "Cloning Mat. & Meth.", cloning==null?null:cloning.getDefinedMaterialOrMethod(), style);
}
/*
*/
@Override
public void handleEvent(Object eventSource) {
- if(eventSource==textCloningStrain || eventSource==date|| eventSource==selectionCloningStaff || eventSource==comboCloningMaterialOrMethod){
- Cloning cloning = getEntity().getCloning();
- if(cloning==null){
- cloning = Cloning.NewInstance();
- getEntity().setCloning(cloning);
- }
- if(eventSource==textCloningStrain){
- cloning.setStrain(textCloningStrain.getText());
- }
- else if(eventSource==date){
- cloning.setTimeperiod(date.getTimePeriod());
- }
- else if(eventSource==selectionCloningStaff){
- cloning.setActor(selectionCloningStaff.getSelection());
- }
- else if(eventSource==comboCloningMaterialOrMethod){
- cloning.setDefinedMaterialOrMethod(comboCloningMaterialOrMethod.getSelection());
- }
- }
+// if(eventSource==textCloningStrain || eventSource==date|| eventSource==selectionCloningStaff || eventSource==comboCloningMaterialOrMethod){
+// Cloning cloning = getEntity().getCloning();
+// if(cloning==null){
+// cloning = Cloning.NewInstance();
+// getEntity().setCloning(cloning);
+// }
+// if(eventSource==textCloningStrain){
+// cloning.setStrain(textCloningStrain.getText());
+// }
+// else if(eventSource==date){
+// cloning.setTimeperiod(date.getTimePeriod());
+// }
+// else if(eventSource==selectionCloningStaff){
+// cloning.setActor(selectionCloningStaff.getSelection());
+// }
+// else if(eventSource==comboCloningMaterialOrMethod){
+// cloning.setDefinedMaterialOrMethod(comboCloningMaterialOrMethod.getSelection());
+// }
+// }
}
}
*/
@Override
public Collection<Media> getCollection(Amplification entity) {
- if(entity.getGelPhoto()!=null){
- return Collections.singleton(entity.getGelPhoto());
- }
+// if(entity.getGelPhoto()!=null){
+// return Collections.singleton(entity.getGelPhoto());
+// }
return Collections.EMPTY_LIST;
}
*/
@Override
public Media createNewElement() {
- if(getEntity().getGelPhoto()==null){
- return Media.NewInstance();
- }
+// if(getEntity().getGelPhoto()==null){
+// return Media.NewInstance();
+// }
return null;
}
*/
@Override
public void addElement(Media element) {
- if(getEntity().getGelPhoto()==null){
- getEntity().setGelPhoto(element);
- }
+// if(getEntity().getGelPhoto()==null){
+// getEntity().setGelPhoto(element);
+// }
}
*/
@Override
public void removeElement(Media element) {
- getEntity().setGelPhoto(null);
+// getEntity().setGelPhoto(null);
}
/* (non-Javadoc)
@Override
protected void createControls(ICdmFormElement formElement, SingleRead entity, int style) {
selectionPrimer = formFactory.createSelectionElement(Primer.class, getConversationHolder(), formElement, "Primer", entity.getPrimer(), EntitySelectionElement.ALL, style);
- selectionAmplification = formFactory.createSelectionElement(Amplification.class, getConversationHolder(), formElement, "Amplification", entity.getAmplification(), EntitySelectionElement.ALL, style);
+// selectionAmplification = formFactory.createSelectionElement(Amplification.class, getConversationHolder(), formElement, "Amplification", entity.getAmplification(), EntitySelectionElement.ALL, style);
AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style);
annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
getEntity().setPrimer(selectionPrimer.getSelection());
}
else if(eventSource==selectionAmplification){
- selectionAmplification.getSelection().addSingleRead(getEntity());
+// selectionAmplification.getSelection().addSingleRead(getEntity());
}
}
}