From 0a0a634c719e7a2d8f53e80682c5fbfa5fe715a3 Mon Sep 17 00:00:00 2001
From: Patrick Plitzner
Date: Fri, 15 Feb 2019 14:31:28 +0100
Subject: [PATCH] ref #8011 Layout improvements
- wrap description text
- Use SashForm for SearchComposite
---
.../view/search/facet/SearchComposite.java | 8 +++----
.../facet/term/TermSearchResultComposite.java | 21 +++++++++++--------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchComposite.java
index 1cb7b8bbf..deb6e2186 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchComposite.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/SearchComposite.java
@@ -10,6 +10,7 @@
package eu.etaxonomy.taxeditor.view.search.facet;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -24,13 +25,12 @@ import eu.etaxonomy.taxeditor.model.ImageResources;
* @date 22.01.2019
*
*/
-public class SearchComposite extends Composite {
+public class SearchComposite extends SashForm {
private Text txtSearch;
private ScrolledComposite filterScrolledComposite;
private Composite filterListComposite;
private Composite searchResultComposite;
private ScrolledComposite resultScrolledComposite;
- private Composite composite;
private Button btnSearchButton;
/**
@@ -45,10 +45,9 @@ public class SearchComposite extends Composite {
Composite filterComposite = new Composite(this, SWT.NONE);
filterComposite.setLayout(new GridLayout(1, false));
GridData gd_filterComposite = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
- gd_filterComposite.widthHint = 170;
filterComposite.setLayoutData(gd_filterComposite);
- composite = new Composite(filterComposite, SWT.NONE);
+ Composite composite = new Composite(filterComposite, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
composite.setLayout(new GridLayout(2, false));
@@ -73,6 +72,7 @@ public class SearchComposite extends Composite {
resultScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
resultScrolledComposite.setExpandHorizontal(true);
resultScrolledComposite.setExpandVertical(true);
+ setWeights(new int[] {40, 60});
initSearchResultList();
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/term/TermSearchResultComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/term/TermSearchResultComposite.java
index c15bbe7cc..13367a887 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/term/TermSearchResultComposite.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/search/facet/term/TermSearchResultComposite.java
@@ -11,8 +11,8 @@ package eu.etaxonomy.taxeditor.view.search.facet.term;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DragDetectEvent;
-import org.eclipse.swt.events.DragDetectListener;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -38,21 +38,24 @@ public class TermSearchResultComposite extends CheckBoxSearchResultComposite