17 |
17 |
import org.eclipse.swt.SWT;
|
18 |
18 |
|
19 |
19 |
import eu.etaxonomy.cdm.model.common.TermType;
|
|
20 |
import eu.etaxonomy.cdm.model.name.IBacterialName;
|
|
21 |
import eu.etaxonomy.cdm.model.name.ICultivarPlantName;
|
20 |
22 |
import eu.etaxonomy.cdm.model.name.IFungusName;
|
21 |
23 |
import eu.etaxonomy.cdm.model.name.INonViralName;
|
22 |
24 |
import eu.etaxonomy.cdm.model.name.IZoologicalName;
|
... | ... | |
54 |
56 |
private TextWithLabelElement text_infraspecificEpithet;
|
55 |
57 |
private SelectionArbitrator selectionArbitrator;
|
56 |
58 |
private CheckboxElement checkbox_anamorphic;
|
|
59 |
private TextWithLabelElement text_cultivarName;
|
|
60 |
private TextWithLabelElement text_subGenusAuthorship;
|
|
61 |
private TextWithLabelElement text_nameApprobation;
|
57 |
62 |
private TextWithLabelElement text_breed;
|
58 |
63 |
//private NumberWithLabelElement text_publicationYear;
|
59 |
64 |
//private NumberWithLabelElement text_originalPublicationYear;
|
... | ... | |
179 |
184 |
logger.warn("ICVCN not yet implemented");
|
180 |
185 |
break;
|
181 |
186 |
case ICNB:
|
182 |
|
//TODO implement
|
183 |
|
logger.warn("ICNB not yet implemented");
|
|
187 |
createBacterialNameParts(formElement, nonViralName, style);
|
184 |
188 |
break;
|
185 |
189 |
case ICNCP:
|
186 |
|
//TODO implement
|
187 |
|
logger.warn("ICNCP not yet implemented");
|
|
190 |
createCultivarNameParts(formElement, nonViralName, style);
|
188 |
191 |
break;
|
189 |
192 |
case NonViral:
|
190 |
193 |
//TODO implement
|
... | ... | |
195 |
198 |
}
|
196 |
199 |
|
197 |
200 |
|
|
201 |
private void createBacterialNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style) {
|
|
202 |
IBacterialName bacterialName = (IBacterialName) nonViralName;
|
|
203 |
text_subGenusAuthorship = formFactory.createTextWithLabelElement(formElement, "Subgenus Authorship", bacterialName.getSubGenusAuthorship(), style);
|
|
204 |
text_nameApprobation = formFactory.createTextWithLabelElement(formElement, "Name Approbation", bacterialName.getNameApprobation(), style);
|
|
205 |
|
|
206 |
}
|
|
207 |
|
|
208 |
private void createCultivarNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style) {
|
|
209 |
ICultivarPlantName cultivarName = (ICultivarPlantName)nonViralName;
|
|
210 |
text_cultivarName = formFactory.createTextWithLabelElement(formElement, "Cultivar Name", cultivarName.getCultivarName(), style);
|
|
211 |
|
|
212 |
}
|
|
213 |
|
198 |
214 |
private void createBotanicalNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style){
|
199 |
215 |
//nothing to do
|
200 |
216 |
}
|
201 |
217 |
|
202 |
218 |
private void createFungusNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style){
|
203 |
|
IFungusName fungusName = (IFungusName)nonViralName;
|
|
219 |
IFungusName fungusName= (IFungusName)nonViralName;
|
204 |
220 |
checkbox_anamorphic = formFactory.createCheckbox(formElement, "Anamorphic", fungusName.isAnamorphic(), style);
|
205 |
221 |
}
|
206 |
222 |
|
... | ... | |
280 |
296 |
((IFungusName)getEntity()).setAnamorphic(checkbox_anamorphic.getSelection());
|
281 |
297 |
}else if(eventSource == text_breed){
|
282 |
298 |
((IZoologicalName)getEntity()).setBreed(text_breed.getText());
|
|
299 |
}else if(eventSource == this.text_cultivarName){
|
|
300 |
((ICultivarPlantName)getEntity()).setCultivarName(text_cultivarName.getText());
|
|
301 |
}else if(eventSource == this.text_subGenusAuthorship){
|
|
302 |
((IBacterialName)getEntity()).setSubGenusAuthorship(text_subGenusAuthorship.getText());
|
|
303 |
}else if(eventSource == this.text_nameApprobation){
|
|
304 |
((IBacterialName)getEntity()).setNameApprobation(text_nameApprobation.getText());
|
283 |
305 |
}
|
284 |
306 |
|
285 |
307 |
}
|
ref #6693: add the missing nomenclatural codes for name details view