Search in sources :

Example 1 with TreeExtremityDescriptor

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

the class HL7Tree2SchemaLinker method addLinks.

public void addLinks(TreeItem itemSource, Object data1, Table tableTarget, Object data2) {
    LinkDescriptor<TreeItem, Object, Table, Object> link = new LinkDescriptor<TreeItem, Object, Table, Object>(new TreeExtremityDescriptor(itemSource, data1), new ExtremityLink<Table, Object>(tableTarget, data2));
    link.setStyleLink(createStandardLink(new Color(getBgDrawableComposite().getDisplay(), 255, 102, 102)));
    getLinksManager().addLink(link);
}
Also used : Table(org.eclipse.swt.widgets.Table) TreeItem(org.eclipse.swt.widgets.TreeItem) Color(org.eclipse.swt.graphics.Color) TreeExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.TreeExtremityDescriptor) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Example 2 with TreeExtremityDescriptor

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

the class JSONToXPathLinker method addLink.

/**
     * DOC amaumont Comment method "addLink".
     * 
     * @param treeItem
     * @param dataItem1
     * @param table
     * @param dataItem2
     */
private LinkDescriptor<TreeItem, Object, Table, Object> addLink(TreeItem treeItem, Object dataItem1, Table table, Object dataItem2, Boolean flag) {
    LinkDescriptor<TreeItem, Object, Table, Object> link = new LinkDescriptor<TreeItem, Object, Table, Object>(new TreeExtremityDescriptor(treeItem, dataItem1), new ExtremityLink<Table, Object>(table, dataItem2));
    link.setStyleLink(getUnselectedStyleLink());
    getLinksManager().addLink(link);
    updateLinksStyleAndControlsSelection(table, flag);
    return link;
}
Also used : Table(org.eclipse.swt.widgets.Table) TreeItem(org.eclipse.swt.widgets.TreeItem) TreeExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.TreeExtremityDescriptor) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Aggregations

Table (org.eclipse.swt.widgets.Table)2 TreeItem (org.eclipse.swt.widgets.TreeItem)2 LinkDescriptor (org.talend.commons.ui.swt.drawing.link.LinkDescriptor)2 TreeExtremityDescriptor (org.talend.commons.ui.swt.drawing.link.TreeExtremityDescriptor)2 Color (org.eclipse.swt.graphics.Color)1