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;
}
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;
}
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;
}
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();
}
Aggregations