use of org.talend.designer.dbmap.ui.visualmap.zone.InputsZone in project tdi-studio-se by Talend.
the class MapperUI method createInputZoneWithTables.
private void createInputZoneWithTables(MapperModel mapperModel, UIManager uiManager, final Display display) {
inputsZone = new InputsZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
inputsZone.createHeaderZoneComponents();
sc1 = new ScrolledComposite(inputsZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
// this.dropTargetOperationListener.addControl(sc1);
GridData sc1GridData = new GridData(GridData.FILL_BOTH);
sc1.setLayoutData(sc1GridData);
sc1.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.addControlListener(new ControlListener() {
public void controlMoved(ControlEvent e) {
// System.out.println("sc1 controlMoved");
}
public void controlResized(ControlEvent e) {
// System.out.println("sc1 controlResized");
onSashResized(display);
}
});
inputTablesZoneView = new InputTablesZoneView(sc1, getBorder(), mapperManager);
// this.dropTargetOperationListener.addControl(inputTablesZoneView);
inputTablesZoneView.setBackgroundMode(SWT.INHERIT_DEFAULT);
sc1.setExpandHorizontal(true);
sc1.setContent(inputTablesZoneView);
sc1MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc1);
inputTablesZoneView.initInsertionIndicator();
Control previousControl = null;
List<InputTable> tables = mapperModel.getInputDataMapTables();
Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
if (minimizeStateOfTables != null) {
inputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
}
for (InputTable inputTable : tables) {
InputDataMapTableView dataMapTableView = uiManager.createNewInputTableView(previousControl, inputTable, inputTablesZoneView);
if (previousControl == null) {
uiManager.updateDropDownJoinTypeForInputs();
}
previousControl = dataMapTableView;
}
inputTablesZoneView.setSize(inputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
Aggregations