ref #9116: layout issues
authorKatja Luther <k.luther@bgbm.org>
Wed, 19 Aug 2020 11:49:44 +0000 (13:49 +0200)
committerKatja Luther <k.luther@bgbm.org>
Wed, 19 Aug 2020 11:49:44 +0000 (13:49 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/TextWithLabelElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java

index ffaeb61267ace388e5431fb9cd0460b1e8bb5c54..e736590ada76459b065932ff13dd33f59b6d0269 100644 (file)
@@ -223,4 +223,12 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
         text.setTextLimit(limit);
     }
 
+    public void setIndent(int indent){
+        TableWrapData tableWrapData = (TableWrapData)label.getLayoutData();
+        tableWrapData.indent = indent;
+
+        label.setLayoutData(tableWrapData);
+        getLayoutComposite().layout();
+    }
+
 }
index 7ab81732f2d10aaee160150edb5c66ccf48abc04..5241051ce31142382dc91564b9b05e5b4f2f854d 100644 (file)
@@ -82,7 +82,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
        private EntitySelectionElement<TaxonName> selection_reuseExistingName;
     private EntitySelectionElement<Reference> selection_SecRef;
 
-    private OriginalSourceElement sourceSection;
+    private OriginalSourceElement singleSourceSection;
 
     private TextWithLabelElement textTaxonSec;
        private TextWithLabelElement microReference;
@@ -107,7 +107,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
        }
 
     public Reference getRef() {
-        return sourceSection.getEntity().getCitation();
+        return singleSourceSection.getEntity().getCitation();
     }
     public TaxonName getExistingName() {
         return selection_reuseExistingName.getEntity();
@@ -251,13 +251,13 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
 
 
 
-               sourceSection = formFactory.createOriginalSourceElement(formElement, entity);
+               singleSourceSection = formFactory.createOriginalSourceElement(formElement, entity);
                if (isCreateNew() || entity.getSource() == null){
                    DescriptionElementSource source = DescriptionElementSource.NewPrimarySourceInstance(null, null);
                    entity.setSource(source);
-                   sourceSection.setEntity(source);
+                   singleSourceSection.setEntity(source);
                }else{
-                   sourceSection.setEntity(entity.getSource());
+                   singleSourceSection.setEntity(entity.getSource());
 
                }
 
@@ -338,7 +338,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
                        complete = !textNewTaxonName.getText().isEmpty();
                }
 
-        if (eventSource == sourceSection) {
+        if (eventSource == singleSourceSection) {
 //            getEntity().setSource((DescriptionElementSource)sourceSection.getEntity());
 
         }else if (eventSource == selection_SecRef) {