use of org.talend.designer.mapper.ui.visualmap.zone.scrollable.VarsTableZoneView in project tdi-studio-se by Talend.
the class MapperUI method createVarsZoneWithTables.
private void createVarsZoneWithTables(MapperModel mapperModel, final Display display) {
Control previousControl;
// Feature TDI-26691 : Add search option
SearchZone searchZone = new SearchZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
searchZone.createSearchZone();
sc2 = new ScrolledComposite(searchZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
GridData sc2GridData = new GridData(GridData.FILL_BOTH);
sc2.setLayoutData(sc2GridData);
varsTableZoneView = new VarsTableZoneView(sc2, getBorder(), mapperManager);
sc2.setContent(varsTableZoneView);
sc2.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc2.setExpandHorizontal(true);
sc2.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc2 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc2 controlResized");
onSashResized(display);
}
});
sc2MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc2);
varsTableZoneView.initInsertionIndicator();
// final Composite finalTablesZoneViewVars = tablesZoneViewVars;
previousControl = null;
for (VarsTable varsTable : mapperModel.getVarsDataMapTables()) {
DataMapTableView dataMapTableView = new VarsDataMapTableView(varsTableZoneView, SWT.BORDER, varsTable, mapperManager);
FormData formData = new FormData();
formData.left = new FormAttachment(0, 0);
formData.right = new FormAttachment(100, 0);
formData.top = new FormAttachment(previousControl);
dataMapTableView.setLayoutData(formData);
previousControl = dataMapTableView;
dataMapTableView.minimizeTable(varsTable.isMinimized());
dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
// dataMapTableView.fillMinimumSize(false);
}
varsTableZoneView.setSize(varsTableZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
sc2MSListener.addMouseWheelListener(sc2);
}
Aggregations