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;
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) {