Search in sources :

Example 1 with ItemExtremityDescriptor

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

the class JSONFileSchema2TreeLinker method addLink.

private LinkDescriptor<Item, Object, Tree, Object> addLink(Item tableItem, Object dataItem1, Tree tree, Object dataItem2, boolean lastOne) {
    LinkDescriptor<Item, Object, Tree, Object> link = new LinkDescriptor<Item, Object, Tree, Object>(new ItemExtremityDescriptor(tableItem, dataItem1), new ExtremityLink<Tree, Object>(tree, dataItem2));
    link.setStyleLink(getUnselectedStyleLink());
    getLinksManager().addLink(link);
    updateLinksStyleAndControlsSelection(tree, lastOne);
    return link;
}
Also used : TableItem(org.eclipse.swt.widgets.TableItem) TreeItem(org.eclipse.swt.widgets.TreeItem) Item(org.eclipse.swt.widgets.Item) ItemExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.ItemExtremityDescriptor) Tree(org.eclipse.swt.widgets.Tree) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Example 2 with ItemExtremityDescriptor

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

the class SchemaXMLLinker method addLink.

/**
     * amaumont Comment method "addLink".
     * 
     * @param tableItem
     * @param dataItem1
     * @param tree
     * @param dataItem2
     */
private LinkDescriptor<Item, Object, Tree, Object> addLink(Item tableItem, Object dataItem1, Tree tree, Object dataItem2, boolean lastOne) {
    LinkDescriptor<Item, Object, Tree, Object> link = new LinkDescriptor<Item, Object, Tree, Object>(new ItemExtremityDescriptor(tableItem, dataItem1), new ExtremityLink<Tree, Object>(tree, dataItem2));
    link.setStyleLink(getUnselectedStyleLink());
    getLinksManager().addLink(link);
    updateLinksStyleAndControlsSelection(tree, lastOne);
    return link;
}
Also used : TableItem(org.eclipse.swt.widgets.TableItem) TreeItem(org.eclipse.swt.widgets.TreeItem) Item(org.eclipse.swt.widgets.Item) ItemExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.ItemExtremityDescriptor) Tree(org.eclipse.swt.widgets.Tree) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Example 3 with ItemExtremityDescriptor

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

the class Schema2XMLLinker method addLink.

/**
     * amaumont Comment method "addLink".
     * 
     * @param tableItem
     * @param dataItem1
     * @param tree
     * @param dataItem2
     */
private LinkDescriptor<Item, Object, Tree, Object> addLink(Item tableItem, Object dataItem1, Tree tree, Object dataItem2) {
    LinkDescriptor<Item, Object, Tree, Object> link = new LinkDescriptor<Item, Object, Tree, Object>(new ItemExtremityDescriptor(tableItem, dataItem1), new ExtremityLink<Tree, Object>(tree, dataItem2));
    link.setStyleLink(getUnselectedStyleLink());
    getLinksManager().addLink(link);
    updateLinksStyleAndControlsSelection(tree);
    return link;
}
Also used : TableItem(org.eclipse.swt.widgets.TableItem) TreeItem(org.eclipse.swt.widgets.TreeItem) Item(org.eclipse.swt.widgets.Item) ItemExtremityDescriptor(org.talend.commons.ui.swt.drawing.link.ItemExtremityDescriptor) Tree(org.eclipse.swt.widgets.Tree) LinkDescriptor(org.talend.commons.ui.swt.drawing.link.LinkDescriptor)

Aggregations

Item (org.eclipse.swt.widgets.Item)3 TableItem (org.eclipse.swt.widgets.TableItem)3 Tree (org.eclipse.swt.widgets.Tree)3 TreeItem (org.eclipse.swt.widgets.TreeItem)3 ItemExtremityDescriptor (org.talend.commons.ui.swt.drawing.link.ItemExtremityDescriptor)3 LinkDescriptor (org.talend.commons.ui.swt.drawing.link.LinkDescriptor)3