Search in sources :

Example 6 with MouseScrolledListener

use of org.talend.designer.abstractmap.ui.listener.MouseScrolledListener 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)6 ControlEvent (org.eclipse.swt.events.ControlEvent)6 ControlListener (org.eclipse.swt.events.ControlListener)6 GridData (org.eclipse.swt.layout.GridData)6 Control (org.eclipse.swt.widgets.Control)6 MouseScrolledListener (org.talend.designer.abstractmap.ui.listener.MouseScrolledListener)6 FormAttachment (org.eclipse.swt.layout.FormAttachment)2 FormData (org.eclipse.swt.layout.FormData)2 InputDataMapTableView (org.talend.designer.mapper.ui.visualmap.table.InputDataMapTableView)2 OutputDataMapTableView (org.talend.designer.mapper.ui.visualmap.table.OutputDataMapTableView)2 IDataMapTable (org.talend.designer.abstractmap.model.table.IDataMapTable)1 InputTable (org.talend.designer.dbmap.model.table.InputTable)1 OutputTable (org.talend.designer.dbmap.model.table.OutputTable)1 InputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView)1 OutputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)1 InputsZone (org.talend.designer.dbmap.ui.visualmap.zone.InputsZone)1 OutputsZone (org.talend.designer.dbmap.ui.visualmap.zone.OutputsZone)1 SearchZone (org.talend.designer.dbmap.ui.visualmap.zone.SearchZone)1 InputTablesZoneView (org.talend.designer.dbmap.ui.visualmap.zone.scrollable.InputTablesZoneView)1 OutputTablesZoneView (org.talend.designer.dbmap.ui.visualmap.zone.scrollable.OutputTablesZoneView)1