Merge branch 'release/5.8.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / wizard / CheckBoxTreeComposite.java
index e2798760ce1529559c7a62c0a2287e980a600075..d3cea9eab1a380c45a269bcb1fcfe0afda3a5706 100644 (file)
@@ -53,15 +53,10 @@ public class CheckBoxTreeComposite extends Composite implements SelectionListene
     public CheckBoxTreeComposite(Composite parent, ITreeContentProvider contentProvider, IBaseLabelProvider labelProvider, int style) {
         super(parent, style);
         GridLayout layout = new GridLayout();
-        parent.setLayout(layout);
-        Composite composite = new Composite(parent, SWT.NULL);
-        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        layout.marginHeight = 0;
+        setLayout(layout);
 
-        GridLayout gl_composite = layout;
-        gl_composite.marginHeight = 0;
-        composite.setLayout(gl_composite);
-
-        Composite toolbar = new Composite(composite, SWT.NONE);
+        Composite toolbar = new Composite(this, SWT.NONE);
         toolbar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
         GridLayout gl_toolbar = new GridLayout(4, false);
         gl_toolbar.horizontalSpacing = 4;
@@ -89,7 +84,7 @@ public class CheckBoxTreeComposite extends Composite implements SelectionListene
         btnSelectAllChildren.setImage(ImageResources.getImage(ImageResources.HIERARCHICAL));
         btnSelectAllChildren.setToolTipText(""); //$NON-NLS-1$
 
-        Tree tree = new Tree(composite, SWT.BORDER | SWT.CHECK);
+        Tree tree = new Tree(this, SWT.BORDER | SWT.CHECK);
         tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
         tree.addListener(SWT.Selection, event -> {
             if (event.detail == SWT.CHECK) {