ref #3836: show always freetext modifier field
authorKatja Luther <k.luther@bgbm.org>
Thu, 11 Apr 2019 09:43:33 +0000 (11:43 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 11 Apr 2019 09:43:33 +0000 (11:43 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/AbstractDetailedDescriptionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CategoricalDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/CommonNameDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/DistributionDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/IndividualsAssociationDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/QuantitativeDataDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/TaxonInteractionDetailElement.java

index 7f18b09..6ecef0d 100644 (file)
@@ -71,6 +71,15 @@ public abstract class AbstractDetailedDescriptionDetailElement<T extends Descrip
         }
     }
 
+    protected void createFreetextModifier(ICdmFormElement formElement, DescriptionElementBase entity,
+            int style) {
+
+        text_modifyingText = formFactory.createTextWithLabelElement(this, "Modifying Text", null, style);
+        if(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()) != null) {
+            text_modifyingText.setText(getEntity().getModifyingText().get(CdmStore.getDefaultLanguage()).getText());
+        }
+    }
+
     @Override
     public void handleEvent(Object eventSource) {
         if(eventSource == timePeriod){
index 6aaeff0..94f5043 100644 (file)
@@ -48,6 +48,8 @@ public class CategoricalDataDetailElement extends AbstractDetailedDescriptionDet
                createTimePeriod(formElement, entity, style);
                if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
                    createModifier(formElement, entity, style);
+               }else{
+                   createFreetextModifier(formElement, entity, style);
                }
        }
 
index 9c9873f..68ad5f6 100644 (file)
@@ -70,6 +70,8 @@ public class CommonNameDetailElement extends AbstractDetailedDescriptionDetailEl
                createTimePeriod(formElement, entity, style);
                if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
             createModifier(formElement, entity, style);
+        }else{
+            createFreetextModifier(formElement, entity, style);
         }
 
        }
index 719c15b..ab30860 100644 (file)
@@ -60,6 +60,8 @@ public class DistributionDetailElement extends
         createTimePeriod(formElement, entity, style);
         if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
             createModifier(formElement, entity, style);
+        }else{
+            createFreetextModifier(formElement, entity, style);
         }
        }
 
index 5f61f5c..4ae6151 100644 (file)
@@ -63,6 +63,8 @@ public class IndividualsAssociationDetailElement extends
                createTimePeriod(formElement, entity, style);
                if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
             createModifier(formElement, entity, style);
+        }else{
+            createFreetextModifier(formElement, entity, style);
         }
        }
 
index 6853ace..61893b5 100644 (file)
@@ -53,6 +53,8 @@ public class QuantitativeDataDetailElement extends
                section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
             createModifier(formElement, entity, style);
+        }else{
+            createFreetextModifier(formElement, entity, style);
         }
        }
 
index 2ab1b3c..fa310f3 100644 (file)
@@ -81,6 +81,8 @@ public class TaxonInteractionDetailElement extends
         createTimePeriod(formElement, entity, style);
         if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
             createModifier(formElement, entity, style);
+        }else{
+            createFreetextModifier(formElement, entity, style);
         }
        }