Search in sources :

Example 1 with ExtremityEastArrow

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

the class StyleLinkFactory method getSelectedZoneToOtherZoneStyle.

private IStyleLink getSelectedZoneToOtherZoneStyle(Color foregroundColor) {
    StyleLink style = new StyleLink();
    setCommonsStyleProperties(style);
    style.setDrawableLink(getZoneToZoneLink(style));
    ExtremityEastArrow eastArrowSource = new ExtremityEastArrow(style);
    style.setExtremity1(eastArrowSource);
    ExtremityEastArrow eastArrowTarget = new ExtremityEastArrow(style);
    eastArrowTarget.setXOffset(-eastArrowTarget.getSize().x);
    style.setExtremity2(eastArrowTarget);
    style.setForegroundColor(foregroundColor);
    return style;
}
Also used : IStyleLink(org.talend.commons.ui.swt.drawing.link.IStyleLink) StyleLink(org.talend.commons.ui.swt.drawing.link.StyleLink) ExtremityEastArrow(org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow)

Example 2 with ExtremityEastArrow

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

the class StyleLinkFactory method getSelectedFilterStyle.

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

Example 3 with ExtremityEastArrow

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

the class StyleLinkFactory method getSelectedSameInputZoneStyle.

/**
     * DOC amaumont Comment method "getSelectedSameZoneStyle".
     * 
     * @param foregroundColor
     * @return
     */
public IStyleLink getSelectedSameInputZoneStyle() {
    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 4 with ExtremityEastArrow

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

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

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