Revision 9e01ec16
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java | ||
---|---|---|
237 | 237 |
textNewTaxonName.setEnabled(enabled); |
238 | 238 |
|
239 | 239 |
complete = !textNewTaxonName.getText().isEmpty(); |
240 |
}else if (eventSource == selection_Ref) { |
|
241 |
((TaxonNode) getEntity()).setReference(selection_Ref.getEntity()); |
|
242 |
}else if (eventSource == selection_SecRef) { |
|
243 |
((TaxonNode) getEntity()).getTaxon().setSec(selection_SecRef.getEntity()); |
|
244 |
}else if (eventSource == microReference) { |
|
245 |
((TaxonNode) getEntity()).setMicroReference(microReference.getText()); |
|
246 |
} else if (eventSource == textNewTaxonName) { |
|
247 |
boolean enabled = CdmUtils.isBlank(textNewTaxonName.getText()); |
|
248 |
selection_reuseExistingTaxon.setEnabled(enabled); |
|
249 |
selection_reuseExistingName.setEnabled(enabled); |
|
250 |
|
|
251 |
complete = CdmUtils.isNotBlank(textNewTaxonName.getText()); |
|
252 |
} else if (eventSource == checkbox_excluded) { |
|
253 |
excluded = checkbox_excluded.getSelection(); |
|
254 |
((TaxonNode)getEntity()).setExcluded(excluded); |
|
255 |
|
|
256 |
multiLanguageTextExcludedNotes.setEnabled(excluded); |
|
257 |
} else if (eventSource == checkbox_unplaced) { |
|
258 |
unplaced = checkbox_unplaced.getSelection(); |
|
259 |
((TaxonNode)getEntity()).setUnplaced(unplaced); |
|
260 |
} else if (eventSource == checkbox_openInEditor) { |
|
261 |
setOpenInEditor(checkbox_openInEditor.getSelection()); |
|
262 |
} else if (eventSource == checkbox_publish) { |
|
263 |
((TaxonNode)getEntity()).getTaxon().setPublish(checkbox_publish.getSelection()); |
|
264 |
}else if (eventSource == selectionNodeAgentRelation){ |
|
240 |
} |
|
241 |
if(getEntity() instanceof TaxonNode){ |
|
242 |
if (eventSource == selection_Ref) { |
|
243 |
((TaxonNode) getEntity()).setReference(selection_Ref.getEntity()); |
|
244 |
}else if (eventSource == selection_SecRef) { |
|
245 |
((TaxonNode) getEntity()).getTaxon().setSec(selection_SecRef.getEntity()); |
|
246 |
}else if (eventSource == microReference) { |
|
247 |
((TaxonNode) getEntity()).setMicroReference(microReference.getText()); |
|
248 |
} else if (eventSource == textNewTaxonName) { |
|
249 |
boolean enabled = CdmUtils.isBlank(textNewTaxonName.getText()); |
|
250 |
selection_reuseExistingTaxon.setEnabled(enabled); |
|
251 |
selection_reuseExistingName.setEnabled(enabled); |
|
252 |
|
|
253 |
complete = CdmUtils.isNotBlank(textNewTaxonName.getText()); |
|
254 |
} else if (eventSource == checkbox_excluded) { |
|
255 |
excluded = checkbox_excluded.getSelection(); |
|
256 |
((TaxonNode)getEntity()).setExcluded(excluded); |
|
257 |
|
|
258 |
multiLanguageTextExcludedNotes.setEnabled(excluded); |
|
259 |
} else if (eventSource == checkbox_unplaced) { |
|
260 |
unplaced = checkbox_unplaced.getSelection(); |
|
261 |
((TaxonNode)getEntity()).setUnplaced(unplaced); |
|
262 |
} else if (eventSource == checkbox_openInEditor) { |
|
263 |
setOpenInEditor(checkbox_openInEditor.getSelection()); |
|
264 |
} else if (eventSource == checkbox_publish) { |
|
265 |
((TaxonNode)getEntity()).getTaxon().setPublish(checkbox_publish.getSelection()); |
|
266 |
} |
|
267 |
} |
|
268 |
else if (eventSource == selectionNodeAgentRelation){ |
|
265 | 269 |
boolean allComplete = true; |
266 | 270 |
for (ICdmFormElement element : selectionNodeAgentRelation.getElements()){ |
267 | 271 |
allComplete &=((TaxonNodeAgentRelationCollectionElement)element).isComplete(); |
... | ... | |
389 | 393 |
} |
390 | 394 |
|
391 | 395 |
public boolean is_publish() { |
392 |
return checkbox_publish.getSelection();
|
|
396 |
return checkbox_publish!=null?checkbox_publish.getSelection():false;
|
|
393 | 397 |
} |
394 | 398 |
|
395 | 399 |
public void set_publish(boolean publish) { |
Also available in: Unified diff
ref #7679 Temporary hotfix for NPE in taxon node wizard