Search in sources :

Example 1 with BezierHorizontalLink

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

the class JSONToXPathLinker method getSelectedRelativeStyleLink.

/**
     * DOC amaumont Comment method "getSelectedRelativeStyleLink".
     * 
     * @param selectedLoopLinkColor
     */
private void getSelectedRelativeStyleLink() {
    StyleLink selectedStyleLink = new StyleLink();
    selectedStyleLink.setDrawableLink(new BezierHorizontalLink(selectedStyleLink));
    selectedStyleLink.setForegroundColor(selectedRelativeLinkColor);
    selectedStyleLink.setLineWidth(2);
    int xOffset = WindowSystem.isGTK() ? 2 : -2;
    int yOffset = WindowSystem.isGTK() ? -1 : 0;
    selectedStyleLink.setExtremity2(new ExtremityEastArrow(selectedStyleLink, -ExtremityEastArrow.WIDTH_ARROW + xOffset, yOffset));
    setSelectedStyleLink(selectedStyleLink);
}
Also used : StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) BezierHorizontalLink(org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 2 with BezierHorizontalLink

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

the class HL7Tree2SchemaLinker method createStandardLink.

protected StyleLink createStandardLink(Color color) {
    StyleLink styleLink = new StyleLink();
    BezierHorizontalLink link = new BezierHorizontalLink(styleLink);
    // LineLinkWithHorizontalConnectors link = new LineLinkWithHorizontalConnectors(styleLink);
    // link.setConnectorWidth(40);
    styleLink.setDrawableLink(link);
    styleLink.setForegroundColor(color);
    styleLink.setLineWidth(2);
    styleLink.setExtremity2(new ExtremityEastArrow(styleLink, -5, 0));
    return styleLink;
}
Also used : StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) BezierHorizontalLink(org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 3 with BezierHorizontalLink

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

the class JSONToXPathLinker method getSelectedLoopStyleLink.

public StyleLink getSelectedLoopStyleLink() {
    if (this.selectedLoopStyleLink == null) {
        StyleLink styleLink = new StyleLink();
        styleLink.setDrawableLink(new BezierHorizontalLink(styleLink));
        styleLink.setForegroundColor(selectedLoopLinkColor);
        styleLink.setLineWidth(2);
        int xOffset = WindowSystem.isGTK() ? 2 : -2;
        int yOffset = WindowSystem.isGTK() ? -1 : 0;
        styleLink.setExtremity2(new ExtremityEastArrow(styleLink, -ExtremityEastArrow.WIDTH_ARROW + xOffset, yOffset));
        this.selectedLoopStyleLink = styleLink;
    }
    return this.selectedLoopStyleLink;
}
Also used : StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) BezierHorizontalLink(org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 4 with BezierHorizontalLink

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

the class JSONToXPathLinker method init.

/**
     * DOC amaumont Comment method "init".
     * 
     * @param tree
     */
private void init() {
    Display display = getBgDrawableComposite().getDisplay();
    initColors(display);
    StyleLink unselectedStyleLink = new StyleLink();
    unselectedStyleLink.setDrawableLink(new BezierHorizontalLink(unselectedStyleLink));
    unselectedStyleLink.setForegroundColor(display.getSystemColor(SWT.COLOR_GRAY));
    unselectedStyleLink.setLineWidth(2);
    int xOffset = WindowSystem.isGTK() ? 2 : -2;
    int yOffset = WindowSystem.isGTK() ? -1 : 0;
    unselectedStyleLink.setExtremity2(new ExtremityEastArrow(unselectedStyleLink, -ExtremityEastArrow.WIDTH_ARROW + xOffset, yOffset));
    setUnselectedStyleLink(unselectedStyleLink);
    getSelectedRelativeStyleLink();
    initListeners();
    createLinks();
}
Also used : StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) BezierHorizontalLink(org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow) Display(org.eclipse.swt.widgets.Display)

Example 5 with BezierHorizontalLink

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

the class WebServiceTableLiner method createStandardLink.

protected StyleLink createStandardLink(Color color) {
    StyleLink styleLink = new StyleLink();
    BezierHorizontalLink link = new BezierHorizontalLink(styleLink);
    // LineLinkWithHorizontalConnectors link = new LineLinkWithHorizontalConnectors(styleLink);
    // link.setConnectorWidth(40);
    styleLink.setDrawableLink(link);
    styleLink.setForegroundColor(color);
    styleLink.setLineWidth(2);
    styleLink.setExtremity2(new ExtremityEastArrow(styleLink, 0, 0));
    return styleLink;
}
Also used : StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) BezierHorizontalLink(org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Aggregations

BezierHorizontalLink (org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink)5 ExtremityEastArrow (org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)5 IStyleLink (org.talend.commons.ui.swt.drawing.link.IStyleLink)5 StyleLink (org.talend.commons.ui.swt.drawing.link.StyleLink)5 Display (org.eclipse.swt.widgets.Display)1