Search in sources :

Example 6 with InputDataMapTableView

use of org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView in project tdi-studio-se by Talend.

the class MapperManager method removeSelectedAliasInputTable.

public void removeSelectedAliasInputTable() {
    InputDataMapTableView currentSelectedDataMapTableView = uiManager.getCurrentSelectedInputTableView();
    if (currentSelectedDataMapTableView != null) {
        String tableName = currentSelectedDataMapTableView.getDataMapTable().getName();
        if (MessageDialog.openConfirm(currentSelectedDataMapTableView.getShell(), //$NON-NLS-1$
        Messages.getString("MapperManager.removeInputTableTitle"), Messages.getString("MapperManager.removeInputTableTitleMessage", new Object[] { tableName }))) {
            //$NON-NLS-1$
            IProcess process = mapperComponent.getProcess();
            uiManager.removeInputTableView(currentSelectedDataMapTableView);
            uiManager.updateToolbarButtonsStates(Zone.INPUTS);
            process.removeUniqueConnectionName(currentSelectedDataMapTableView.getDataMapTable().getName());
            uiManager.refreshSqlExpression();
        }
    }
}
Also used : InputDataMapTableView(org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView) IProcess(org.talend.core.model.process.IProcess)

Example 7 with InputDataMapTableView

use of org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView in project tdi-studio-se by Talend.

the class UIManager method createNewInputTableView.

public InputDataMapTableView createNewInputTableView(Control previousControl, InputTable inputTable, Composite parent) {
    InputDataMapTableView dataMapTableView = new InputDataMapTableView(parent, SWT.BORDER, inputTable, 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);
    dataMapTableView.minimizeTable(inputTable.isMinimized());
    dataMapTableView.registerStyledExpressionEditor(getTabFolderEditors().getStyledTextHandler());
    this.mapperUI.getInputMouseSrolledListener().addMouseWheelListener(dataMapTableView);
    return dataMapTableView;
}
Also used : FormData(org.eclipse.swt.layout.FormData) InputDataMapTableView(org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Aggregations

InputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView)7 DataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.DataMapTableView)4 OutputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)4 Point (org.eclipse.swt.graphics.Point)2 FormAttachment (org.eclipse.swt.layout.FormAttachment)2 FormData (org.eclipse.swt.layout.FormData)2 GridData (org.eclipse.swt.layout.GridData)2 Control (org.eclipse.swt.widgets.Control)2 AbstractMetadataTableEditorView (org.talend.core.ui.metadata.editor.AbstractMetadataTableEditorView)2 MetadataTableEditorView (org.talend.core.ui.metadata.editor.MetadataTableEditorView)2 InputTable (org.talend.designer.dbmap.model.table.InputTable)2 TabFolderEditors (org.talend.designer.dbmap.ui.tabs.TabFolderEditors)2 InputsZone (org.talend.designer.dbmap.ui.visualmap.zone.InputsZone)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 SashForm (org.eclipse.swt.custom.SashForm)1 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 ControlEvent (org.eclipse.swt.events.ControlEvent)1 ControlListener (org.eclipse.swt.events.ControlListener)1