Search in sources :

Example 1 with OutputTablesZoneView

use of org.talend.designer.dbmap.ui.visualmap.zone.scrollable.OutputTablesZoneView in project tdi-studio-se by Talend.

the class MapperUI method createOutputZoneWithTables.

private void createOutputZoneWithTables(MapperModel mapperModel, final UIManager uiManager, final Display display) {
    Control previousControl;
    outputsZone = new OutputsZone(datasFlowViewSashForm, SWT.NONE, mapperManager);
    outputsZone.createHeaderZoneComponents();
    // this.dropTargetOperationListener.addControl(outputsZone);
    sc3 = new ScrolledComposite(outputsZone, getBorder() | SWT.H_SCROLL | SWT.V_SCROLL);
    // this.dropTargetOperationListener.addControl(sc3);
    GridData sc3GridData = new GridData(GridData.FILL_BOTH);
    sc3.setLayoutData(sc3GridData);
    sc3.setBackgroundMode(SWT.INHERIT_DEFAULT);
    sc3.addControlListener(new ControlListener() {

        public void controlMoved(ControlEvent e) {
        // System.out.println("sc3 controlMoved");
        }

        public void controlResized(ControlEvent e) {
            // System.out.println("sc3 controlResized");
            onSashResized(display);
        }
    });
    outputTablesZoneView = new OutputTablesZoneView(sc3, getBorder(), mapperManager);
    // this.dropTargetOperationListener.addControl(outputTablesZoneView);
    outputTablesZoneView.setBackgroundMode(SWT.INHERIT_DEFAULT);
    sc3.setExpandHorizontal(true);
    sc3.setContent(outputTablesZoneView);
    sc3MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc3);
    outputTablesZoneView.initInsertionIndicator();
    previousControl = null;
    List<OutputTable> tables = mapperModel.getOutputDataMapTables();
    Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
    if (minimizeStateOfTables != null) {
        outputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
    }
    for (IDataMapTable abstractDataMapTable : tables) {
        OutputDataMapTableView dataMapTableView = uiManager.createNewOutputTableView(previousControl, abstractDataMapTable, outputTablesZoneView);
        previousControl = dataMapTableView;
    }
    outputTablesZoneView.setSize(outputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
Also used : IDataMapTable(org.talend.designer.abstractmap.model.table.IDataMapTable) OutputsZone(org.talend.designer.dbmap.ui.visualmap.zone.OutputsZone) OutputTablesZoneView(org.talend.designer.dbmap.ui.visualmap.zone.scrollable.OutputTablesZoneView) MouseScrolledListener(org.talend.designer.abstractmap.ui.listener.MouseScrolledListener) OutputTable(org.talend.designer.dbmap.model.table.OutputTable) Control(org.eclipse.swt.widgets.Control) GridData(org.eclipse.swt.layout.GridData) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ControlListener(org.eclipse.swt.events.ControlListener) ControlEvent(org.eclipse.swt.events.ControlEvent) OutputDataMapTableView(org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)

Aggregations

ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 ControlEvent (org.eclipse.swt.events.ControlEvent)1 ControlListener (org.eclipse.swt.events.ControlListener)1 GridData (org.eclipse.swt.layout.GridData)1 Control (org.eclipse.swt.widgets.Control)1 IDataMapTable (org.talend.designer.abstractmap.model.table.IDataMapTable)1 MouseScrolledListener (org.talend.designer.abstractmap.ui.listener.MouseScrolledListener)1 OutputTable (org.talend.designer.dbmap.model.table.OutputTable)1 OutputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)1 OutputsZone (org.talend.designer.dbmap.ui.visualmap.zone.OutputsZone)1 OutputTablesZoneView (org.talend.designer.dbmap.ui.visualmap.zone.scrollable.OutputTablesZoneView)1