ref #9266: layout issues
authorKatja Luther <k.luther@bgbm.org>
Tue, 24 Nov 2020 10:00:52 +0000 (11:00 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 24 Nov 2020 10:00:52 +0000 (11:00 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/NomenclaturalSourceElement.java

index 9c1cac5eca955e7562bf2a7e939b34b5da4280e7..d5f59282891f3e217fa7405c7be1921f8089d735 100755 (executable)
@@ -9,13 +9,17 @@
 package eu.etaxonomy.taxeditor.ui.section.reference;
 
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.forms.widgets.TableWrapData;
 
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
 import eu.etaxonomy.cdm.model.name.TaxonName;
+import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
 import eu.etaxonomy.cdm.model.reference.OriginalSourceBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.preference.Resources;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
@@ -35,7 +39,7 @@ public class NomenclaturalSourceElement extends OriginalSourceElement {
 
     protected EntitySelectionElement<Reference> selection_Ref;
     protected TextWithLabelElement microReference;
-    protected OriginalSourceAdvancedSection advancedSection;
+//    protected OriginalSourceAdvancedSection advancedSection;
     protected String label = "Source";
     protected CdmBase cdmEntity;
 
@@ -86,20 +90,20 @@ public class NomenclaturalSourceElement extends OriginalSourceElement {
         externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Protologue/Original Publication", StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
         externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
         externalLinks.setEntity(entity);
+        externalLinks.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
         externalLinks.setEmptySectionString("No protologue yet.");
 
         addControl(externalLinks);
         addElement(externalLinks);
 
-//        advancedSection = formFactory.createOriginalSourceAdvancedSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(OriginalSourceAdvancedSection.class, INomenclaturalReference.class.getCanonicalName()));
-//        TableWrapData layoutData = LayoutConstants.FILL_HORIZONTALLY(2, 1);
-//        layoutData.indent = 10;
-//
-//        advancedSection.setLayoutData(layoutData);
-//        advancedSection.setBackground(this.getPersistentBackground());
-//        advancedSection.setEntity(entity);
-//        addControl(advancedSection);
-//        addElement(advancedSection);
+        advancedSection = formFactory.createOriginalSourceAdvancedSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(OriginalSourceAdvancedSection.class, INomenclaturalReference.class.getCanonicalName()));
+        TableWrapData layoutData = LayoutConstants.FILL_HORIZONTALLY(2, 1);
+
+        advancedSection.setLayoutData(layoutData);
+        advancedSection.setBackground(this.getPersistentBackground());
+        advancedSection.setEntity(entity);
+        addControl(advancedSection);
+        addElement(advancedSection);
 
 
         this.getLayoutComposite().layout();