20 |
20 |
import org.eclipse.swt.SWT;
|
21 |
21 |
import org.eclipse.swt.dnd.DND;
|
22 |
22 |
import org.eclipse.swt.dnd.Transfer;
|
|
23 |
import org.eclipse.swt.layout.GridData;
|
|
24 |
import org.eclipse.swt.layout.GridLayout;
|
23 |
25 |
import org.eclipse.swt.widgets.Composite;
|
24 |
26 |
import org.eclipse.swt.widgets.Control;
|
25 |
27 |
import org.eclipse.swt.widgets.Menu;
|
... | ... | |
47 |
49 |
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
|
48 |
50 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
|
49 |
51 |
import eu.etaxonomy.taxeditor.store.CdmStore;
|
50 |
|
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
|
51 |
52 |
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateContentProvider;
|
52 |
53 |
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
|
53 |
54 |
|
... | ... | |
92 |
93 |
@Override
|
93 |
94 |
public void createPartControl(Composite parent) {
|
94 |
95 |
|
95 |
|
parent.setLayout(LayoutConstants.LAYOUT());
|
96 |
|
parent.setLayoutData(LayoutConstants.FILL());
|
|
96 |
parent.setLayout(new GridLayout());
|
97 |
97 |
|
98 |
98 |
//---search and filter---
|
99 |
99 |
derivateSearchCompositeController = new DerivateSearchCompositeController(parent, this);
|
100 |
100 |
derivateSearchCompositeController.setEnabled(CdmStore.isActive());
|
101 |
|
derivateSearchCompositeController.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
|
|
101 |
GridData gridDataSearchBar = new GridData();
|
|
102 |
gridDataSearchBar.horizontalAlignment = GridData.FILL;
|
|
103 |
gridDataSearchBar.grabExcessHorizontalSpace = true;
|
|
104 |
derivateSearchCompositeController.setLayoutData(gridDataSearchBar);
|
102 |
105 |
|
103 |
106 |
//---tree viewer---
|
104 |
107 |
viewer = new TreeViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION));
|
105 |
|
viewer.getTree().setLayoutData(LayoutConstants.FILL());
|
|
108 |
GridData gridDataTree = new GridData();
|
|
109 |
gridDataTree.horizontalAlignment = GridData.FILL;
|
|
110 |
gridDataTree.verticalAlignment = GridData.FILL;
|
|
111 |
gridDataTree.grabExcessVerticalSpace = true;
|
|
112 |
gridDataTree.grabExcessHorizontalSpace = true;
|
|
113 |
viewer.getTree().setLayoutData(gridDataTree);
|
106 |
114 |
contentProvider = new DerivateContentProvider();
|
107 |
115 |
viewer.setContentProvider(contentProvider);
|
108 |
116 |
labelProvider = new DerivateLabelProvider();
|
Fix layout of derivative tree