Search in sources :

Example 1 with TableExtremityDescriptor

use of org.talend.commons.ui.swt.drawing.link.TableExtremityDescriptor in project tdi-studio-se by Talend.

the class WebServiceTableLiner method addLinks.

public void addLinks(TableItem itemSource, Object data1, Table tableTarget, Object data2, String mark) {
    LinkDescriptor<TableItem, Object, Table, Object> link = new LinkDescriptor<TableItem, Object, Table, Object>(new TableExtremityDescriptor(itemSource, data1), new ExtremityLink<Table, Object>(tableTarget, data2));
    link.setStyleLink(createStandardLink(new Color(getBgDrawableComposite().getDisplay(), 255, 102, 102)));
    getLinksManager().addLink(link);
    if (mark.equals("INPUTMAPPING")) {
        sourceInList.add(((IMetadataColumn) itemSource.getData()).getLabel());
    } else if (mark.equals("OUTPUTMAPPING")) {
        if (((OutPutMappingData) itemSource.getData()).getParameterName() != null) {
            String sourseName = ((OutPutMappingData) itemSource.getData()).getParameterName();
            // int m = sourseName.lastIndexOf(".");
            // sourseName = sourseName.substring(m + 1);
            sourceOutList.add(sourseName);
        } else {
            sourceOutList.add(((OutPutMappingData) itemSource.getData()).getParameter().getName());
        }
    }
}
Also used : TableExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.TableExtremityDescriptor) Table(org.eclipse.swt.widgets.Table) OutPutMappingData(org.talend.designer.webservice.data.OutPutMappingData) TableItem(org.eclipse.swt.widgets.TableItem) Color(org.eclipse.swt.graphics.Color) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Aggregations

Color (org.eclipse.swt.graphics.Color)1 Table (org.eclipse.swt.widgets.Table)1 TableItem (org.eclipse.swt.widgets.TableItem)1 LinkDescriptor (org.talend.commons.ui.swt.drawing.link.LinkDescriptor)1 TableExtremityDescriptor (org.talend.commons.ui.swt.drawing.link.TableExtremityDescriptor)1 OutPutMappingData (org.talend.designer.webservice.data.OutPutMappingData)1