+/**
+* Copyright (C) 2020 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.section.reference;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+
+import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
+import eu.etaxonomy.cdm.model.reference.OriginalSourceBase;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+
+/**
+ * @author k.luther
+ * @since Nov 12, 2020
+ */
+public class AdvancedNomenclaturalSourceElement extends AdvancedSourceElement {
+
+ /**
+ * @param formFactory
+ * @param formElement
+ */
+ public AdvancedNomenclaturalSourceElement(CdmFormFactory formFactory, ICdmFormElement formElement) {
+ super(formFactory, formElement);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ protected void createControls(ICdmFormElement formElement, OriginalSourceBase entity, int style) {
+ Display display = Display.getCurrent();
+ Color background = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+
+
+ if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey())){
+ text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", entity != null?entity.getIdNamespace():null, style);
+ text_idNamespace.setBackground(background);
+ }
+ if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowIdInSource.getKey())){
+ text_idInSource = formFactory.createTextWithLabelElement(formElement, "ID in Source", entity != null?entity.getIdInSource():null, style);
+ text_idInSource.setBackground(background);
+
+ }
+
+ text_originaleNameString = formFactory.createTextWithLabelElement(
+ formElement, "Original Information", entity != null?entity.getOriginalNameString():null, SWT.NULL);
+
+ text_originaleNameString.setBackground(background);
+ Label label = formFactory.createEmptyCell(getLayoutComposite());
+ }
+
+}