ref #10364: move add button to the right and refresh after remove line
authorKatja Luther <k.luther@bgbm.org>
Fri, 13 Oct 2023 08:22:52 +0000 (10:22 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 13 Oct 2023 08:22:52 +0000 (10:22 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/categorical/CategoricalDataDialogComposite.java

index 0b2dd528eac90db968af4d951ecce09b67aa371d..9ea67cacbdeff2d32c6357f9bc918a3b26ea70ed 100644 (file)
@@ -63,8 +63,7 @@ public class CategoricalDataDialogComposite extends DataDialogComposite {
 
         
 
-        Label lblNoDataLabel = new Label(this, SWT.NONE);
-        lblNoDataLabel.setText("No Data Available");
+        
         //lblNoDataLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
 
         createNoDataCombo(this);
@@ -74,6 +73,8 @@ public class CategoricalDataDialogComposite extends DataDialogComposite {
 
         valuesComposite.setLayout(new GridLayout(1, false));       
         Button addNewState =  new Button(valuesComposite, SWT.NONE);
+        addNewState.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, true, 1,1));
+        
         addNewState.setImage(ImageResources.getImage(ImageResources.ADD_ICON));
         //new Label(composite_2, SWT.NONE);
         addNewState.addSelectionListener(new SelectionAdapter() {
@@ -204,6 +205,8 @@ public class CategoricalDataDialogComposite extends DataDialogComposite {
             public void widgetSelected(SelectionEvent e) {
                   composite_2.dispose();
                   stateList.remove(selectedState);
+                  valuesComposite.getShell().redraw();
+                  valuesComposite.getShell().pack();
             }
         });