ref #7981: improve aggregation ui
authorKatja Luther <k.luther@bgbm.org>
Fri, 1 Oct 2021 15:51:17 +0000 (17:51 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 1 Oct 2021 15:51:17 +0000 (17:51 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/StructuredDescriptionAggregationConfigurationWizardPage.java

index 6c3a0653e6c09a59150946f0a268262678006304..01cb52b923ca424e57f3f12ad42bad9668279010 100644 (file)
@@ -605,7 +605,7 @@ StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE=Aggregate selected sub
 StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=If not all subtrees included in the descriptive dataset should be aggregated, select the subtrees for the aggregation
 StructuredDescriptionAggregationWizardPage_SELECT_ALL_SUBTREES=Aggregate all taxa in descriptive dataset
 StructuredDescriptionAggregationWizardPage_SELECT_SELECTED_TAXA_ONLY=Aggregate selected taxon/taxa only
-StructuredDescriptionAggregationWizardPage_SELECT_DEFINE_SCOPE=Scope of aggregated data
+StructuredDescriptionAggregationWizardPage_SELECT_DEFINE_SCOPE=Aggregation includes:
 StructuredDescriptionAggregationWizardPage_SELECT_DEFAULT_DESCRIPTION=Default descriptions
 StructuredDescriptionAggregationWizardPage_SELECT_LITERATURE_DESCRIPTION=Literature descriptions
 StructuredDescriptionAggregationWizardPage_SELECT_UNPUBLISHED_TAXA=Unpublished taxa
index 4216cd5ae047ca0f6a90b495d43c69668f5a9bfe..920e710d25926ce9fd20e13d215d191d09352d9b 100644 (file)
@@ -599,12 +599,12 @@ DistributionAggregationWizardPage_TOOLTIP_SOURCEMODE_WITHIN_TAXON=Definiert den
 AggregationWizardPage_SUBTREE=Aggregiere ausgewählten Teilbaum/-bäume
 AggregationWizardPage_SINGLE_TAXON=Aggregation nur für
 SetAggregationConfiguration_Title=Aggregationskonfiguration
-StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE=Aggregiere über den ausgewählten Teilbaum
+StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE=Aggregiere über den/die ausgewählten Taxa/Teilbaum
 StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE=Wenn nicht alle Teilbäume des Descriptive Datasets in die Aggregation einfließen sollen, dann wählen Sie die zu verwendenden Teilbäume aus.
 StructuredDescriptionAggregationWizardPage_SELECT_ALL_SUBTREES=Aggregiere alle Taxa des Descriptive Datasets
 StructuredDescriptionAggregationWizardPage_SELECT_SELECTED_TAXA_ONLY=Aggregiere nur ausgewählte(s) Taxa/Taxon
-StructuredDescriptionAggregationWizardPage_SELECT_UNPUBLISHED_TAXA=Beschreibungen von unpublizierten Taxa
-StructuredDescriptionAggregationWizardPage_SELECT_DEFINE_SCOPE=Zu aggregierende Daten:
+StructuredDescriptionAggregationWizardPage_SELECT_UNPUBLISHED_TAXA=Unpublizierten Taxa
+StructuredDescriptionAggregationWizardPage_SELECT_DEFINE_SCOPE=Bei Aggregation einschließen:
 StructuredDescriptionAggregationWizardPage_SELECT_DEFAULT_DESCRIPTION=Default Beschreibungen
 StructuredDescriptionAggregationWizardPage_SELECT_LITERATURE_DESCRIPTION=Literatur Beschreibungen
 CommonNameLanguages_Title=Sprachen für Trivialnamen
index a4ef2b2495f08a1379af9299046bf25b4dc4c2fe..8008bf4c4e1cf87676a57e6eb90cb3f91b2f1f19 100755 (executable)
@@ -28,6 +28,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.forms.widgets.TableWrapData;
 
 import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.service.description.AggregationMode;
@@ -54,6 +55,8 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
 
     protected Button checkIncludeDefaultDescriptions;
     protected Button checkIncludeLiteratureDescriptions;
+    
+    private Label selectSubtreeLabel;
 
     protected StructuredDescriptionAggregationConfigurationWizardPage(StructuredDescriptionAggregationConfiguration configurator, List<TaxonNodeDto> nodes) {
         super(Messages.DistributionAggregationWizardPage_TITLE);
@@ -89,6 +92,7 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
            @Override
            public void handleEvent(Event e) {
                subTreeSelectionViewer.getTable().setEnabled(!checkUseHigherLevel.getSelection());
+               selectSubtreeLabel.setEnabled(!checkUseHigherLevel.getSelection());
                updateHigherRankCombo();
                if (checkUseHigherLevel.getSelection()){
                    setPageComplete(true);
@@ -103,6 +107,7 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
             @Override
             public void handleEvent(Event e) {
                 subTreeSelectionViewer.getTable().setEnabled(checkUseSelectedSubtree.getSelection());
+                selectSubtreeLabel.setEnabled(checkUseHigherLevel.getSelection());
                 if (checkUseSelectedSubtree.getSelection() && subTreeSelectionViewer.getCheckedElements().length == 0){
                     setPageComplete(false);
                 }else{
@@ -118,6 +123,7 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
             @Override
             public void handleEvent(Event e) {
                 subTreeSelectionViewer.getTable().setEnabled(checkUseSelectedTaxonNode.getSelection());
+                selectSubtreeLabel.setEnabled(!checkUseHigherLevel.getSelection());
                 if (checkUseSelectedTaxonNode.getSelection() && subTreeSelectionViewer.getCheckedElements().length == 0){
                     setPageComplete(false);
                 }else{
@@ -128,9 +134,14 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
         checkUseSelectedSubtree.setSelection(hasTaxonFilter);
 
         //subtree selection
-        Label selectSubtreeLabel = new Label(control, SWT.NULL);
+        selectSubtreeLabel = new Label(control, SWT.NULL);
         selectSubtreeLabel.setText(Messages.StructuredDescriptionAggregationWizardPage_SELECT_SUBTREE);
         selectSubtreeLabel.setToolTipText(Messages.StructuredDescriptionAggregationWizardPage_TOOLTIP_SELECT_SUBTREE);
+        
+        GridData gridData = new GridData();
+        gridData.horizontalIndent = 5;
+        selectSubtreeLabel.setLayoutData(gridData);
+
         subTreeSelectionViewer = CheckboxTableViewer.newCheckList(control, SWT.BORDER | SWT.SINGLE);
         subTreeSelectionViewer.setContentProvider(new ArrayContentProvider());
         subTreeSelectionViewer.setLabelProvider(new LabelProvider(){
@@ -169,20 +180,19 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
             }
         });
 
-        GridLayoutFactory.fillDefaults();
+//        GridLayoutFactory.fillDefaults();
 
         //scope (published taxa, literature + default descriptions)
-        GridData gridDataScopeComposite = new GridData();
-        gridDataScopeComposite.horizontalSpan = 2;
-        GridLayout gridLayoutScopeComposite = new GridLayout();
-        gridLayoutScopeComposite.numColumns = 1;
-        Composite scopeComposite = new Composite(control, SWT.NULL);
-        scopeComposite.setLayoutData(gridDataScopeComposite);
-        scopeComposite.setLayout(gridLayoutScopeComposite);
-
-        Label scopeLabel = new Label(scopeComposite, SWT.NULL);
+        Label scopeLabel = new Label(control, SWT.NULL);
         scopeLabel.setText(Messages.StructuredDescriptionAggregationWizardPage_SELECT_DEFINE_SCOPE);
-
+        
+        Composite scopeComposite = new Composite(control, SWT.NULL);
+        GridLayout gridDataScopeComposite = new GridLayout();
+        gridDataScopeComposite.numColumns = 1;
+        scopeComposite.setLayout(gridDataScopeComposite);
+        
+//        GridLayoutFactory.fillDefaults();
+        
         checkIncludeUnpublishedTaxa = new Button(scopeComposite, SWT.CHECK);
         checkIncludeUnpublishedTaxa.setText(Messages.StructuredDescriptionAggregationWizardPage_SELECT_UNPUBLISHED_TAXA);
         checkIncludeUnpublishedTaxa.setSelection(configurator.getTaxonNodeFilter().isIncludeUnpublished());
@@ -195,7 +205,7 @@ public class StructuredDescriptionAggregationConfigurationWizardPage
         checkIncludeLiteratureDescriptions = new Button(scopeComposite, SWT.CHECK);
         checkIncludeLiteratureDescriptions.setText(Messages.StructuredDescriptionAggregationWizardPage_SELECT_LITERATURE_DESCRIPTION);
         checkIncludeLiteratureDescriptions.setSelection(configurator.isIncludeLiterature());
-
+        GridLayoutFactory.fillDefaults();
         //ranks
         Label higherRankLabel = new Label(control, SWT.NULL);
         higherRankLabel.setText(Messages.DistributionAggregationWizardPage_HIGHEST_RANK);