Search in sources :

Example 16 with StyleLink

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

the class StyleLinkFactory method getSelectedSameVarsZoneStyle.

/**
     * DOC amaumont Comment method "getSelectedSameZoneStyle".
     * 
     * @param foregroundColor
     * @return
     */
public IStyleLink getSelectedSameVarsZoneStyle() {
    StyleLink style = new StyleLink();
    setCommonsStyleProperties(style);
    IDrawableLink sameZoneLink = getSameZoneLink(style);
    style.setDrawableLink(sameZoneLink);
    ExtremityWestArrow westArrow = new ExtremityWestArrow(style);
    style.setExtremity1(westArrow);
    ExtremityEastArrow eastArrowTarget = new ExtremityEastArrow(style);
    eastArrowTarget.setXOffset(-eastArrowTarget.getSize().x);
    style.setExtremity2(eastArrowTarget);
    style.setForegroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_SELECTED_LOOKUP_LINKS));
    return style;
}
Also used : IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) IDrawableLink(org.talend.commons.ui.swt.drawing.link.IDrawableLink) ExtremityWestArrow(org.talend.commons.ui.swt.drawing.link.ExtremityWestArrow) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 17 with StyleLink

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

the class StyleLinkFactory method getUnselectedSameVarsZoneStyle.

/**
     * DOC amaumont Comment method "getNotSelectedSameZoneStyle".
     * 
     * @return
     */
private IStyleLink getUnselectedSameVarsZoneStyle() {
    StyleLink style = new StyleLink();
    setCommonsStyleProperties(style);
    style.setDrawableLink(getSameZoneLink(style));
    ExtremityWestArrow westArrow = new ExtremityWestArrow(style);
    style.setExtremity1(westArrow);
    ExtremityEastArrow eastArrowTarget = new ExtremityEastArrow(style);
    eastArrowTarget.setXOffset(-eastArrowTarget.getSize().x);
    style.setExtremity2(eastArrowTarget);
    style.setForegroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_UNSELECTED_LOOKUP_LINKS));
    return style;
}
Also used : IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) ExtremityWestArrow(org.talend.commons.ui.swt.drawing.link.ExtremityWestArrow) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 18 with StyleLink

use of org.talend.commons.ui.swt.drawing.link.StyleLink 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 19 with StyleLink

use of org.talend.commons.ui.swt.drawing.link.StyleLink 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)

Aggregations

ExtremityEastArrow (org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)19 IStyleLink (org.talend.commons.ui.swt.drawing.link.IStyleLink)19 StyleLink (org.talend.commons.ui.swt.drawing.link.StyleLink)19 BezierHorizontalLink (org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink)5 ExtremityWestArrow (org.talend.commons.ui.swt.drawing.link.ExtremityWestArrow)4 IDrawableLink (org.talend.commons.ui.swt.drawing.link.IDrawableLink)3 Display (org.eclipse.swt.widgets.Display)1