Search in sources :

Example 1 with SearchZone

use of org.talend.designer.dbmap.ui.visualmap.zone.SearchZone 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);
    // this.dropTargetOperationListener.addControl(varsTableZoneView);
    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 (IDataMapTable abstractDataMapTable : mapperModel.getVarsDataMapTables()) {
    //
    // DataMapTableView dataMapTableView = new VarsDataMapTableView(varsTableZoneView, SWT.BORDER,
    // abstractDataMapTable, 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(abstractDataMapTable.isMinimized());
    // // dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
    // // dataMapTableView.fillMinimumSize(false);
    // }
    varsTableZoneView.setSize(varsTableZoneView.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) ControlEvent(org.eclipse.swt.events.ControlEvent) MouseScrolledListener(org.talend.designer.abstractmap.ui.listener.MouseScrolledListener) SearchZone(org.talend.designer.dbmap.ui.visualmap.zone.SearchZone) VarsTableZoneView(org.talend.designer.dbmap.ui.visualmap.zone.scrollable.VarsTableZoneView)

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 SearchZone (org.talend.designer.dbmap.ui.visualmap.zone.SearchZone)1 VarsTableZoneView (org.talend.designer.dbmap.ui.visualmap.zone.scrollable.VarsTableZoneView)1