ref #7095 add label to toolbar
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 11 Jan 2018 08:02:49 +0000 (09:02 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 11 Jan 2018 08:02:49 +0000 (09:02 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java

index bc40ca0d5820bd34b93b49bd7c45aa94f6cf236e..58dc28662fa1d89a0e87e514360f93ce7c8a5479 100644 (file)
@@ -99,6 +99,7 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
 
 import ca.odell.glazedlists.EventList;
 import ca.odell.glazedlists.GlazedLists;
@@ -204,8 +205,8 @@ public class CharacterMatrix implements IE4SavablePart, IPartContentHasDetails,
         thisPart.setLabel(workingSet.getLabel());
 
         Composite toolbarComposite = new Composite(parent, SWT.NONE);
-        toolbarComposite.setLayout(new GridLayout(3, false));
-        toolbarComposite.setLayoutData(new GridData(SWT.TRAIL, SWT.CENTER, true, false));
+        toolbarComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+        toolbarComposite.setLayout(new GridLayout(4, false));
 
         //get features/columns stored in working set
         FeatureTree tree = workingSet.getDescriptiveSystem();
@@ -462,6 +463,13 @@ public class CharacterMatrix implements IE4SavablePart, IPartContentHasDetails,
 
         GridDataFactory.fillDefaults().grab(true, true).applyTo(natTable);
 
+        /**
+         * Info label
+         */
+        Label wsLabel = new Label(toolbarComposite, SWT.NONE);
+        wsLabel.setText(workingSet.getLabel());
+        wsLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
         /**
          * Table state persistence
          */