Search in sources :

Example 1 with OutputTablesZoneView

use of org.talend.designer.mapper.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);
    outputTablesZoneView.initInsertionIndicator();
    previousControl = null;
    List<OutputTable> tables = mapperModel.getOutputDataMapTables();
    Boolean minimizeStateOfTables = getMinimizedButtonState(tables);
    if (minimizeStateOfTables != null) {
        outputsZone.getToolbar().setMinimizeButtonState(minimizeStateOfTables.booleanValue());
    }
    sc3MSListener = new MouseScrolledListener(mapperManager.getUiManager(), sc3);
    for (OutputTable outputTable : tables) {
        OutputDataMapTableView dataMapTableView = uiManager.createNewOutputTableView(previousControl, outputTable, outputTablesZoneView);
        previousControl = dataMapTableView;
    }
    outputTablesZoneView.setSize(outputTablesZoneView.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
Also used : Control(org.eclipse.swt.widgets.Control) GridData(org.eclipse.swt.layout.GridData) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) ControlListener(org.eclipse.swt.events.ControlListener) OutputsZone(org.talend.designer.mapper.ui.visualmap.zone.OutputsZone) OutputTablesZoneView(org.talend.designer.mapper.ui.visualmap.zone.scrollable.OutputTablesZoneView) ControlEvent(org.eclipse.swt.events.ControlEvent) MouseScrolledListener(org.talend.designer.abstractmap.ui.listener.MouseScrolledListener) OutputTable(org.talend.designer.mapper.model.table.OutputTable) OutputDataMapTableView(org.talend.designer.mapper.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 MouseScrolledListener (org.talend.designer.abstractmap.ui.listener.MouseScrolledListener)1 OutputTable (org.talend.designer.mapper.model.table.OutputTable)1 OutputDataMapTableView (org.talend.designer.mapper.ui.visualmap.table.OutputDataMapTableView)1 OutputsZone (org.talend.designer.mapper.ui.visualmap.zone.OutputsZone)1 OutputTablesZoneView (org.talend.designer.mapper.ui.visualmap.zone.scrollable.OutputTablesZoneView)1