Search in sources :

Example 1 with LookupConnectionRouter

use of org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter in project tdi-studio-se by Talend.

the class FilterConnectionPart method getFigure.

@Override
public IFigure getFigure() {
    PolylineConnection figure = (PolylineConnection) super.getFigure();
    if (getTarget() instanceof OutputTablePart) {
        if (curvrRouter == null) {
            curvrRouter = new CurveConnectionRouter();
            figure.setConnectionRouter(curvrRouter);
        }
    } else if (getTarget() instanceof InputTablePart) {
        if (cr == null) {
            cr = new LookupConnectionRouter();
            figure.setConnectionRouter(cr);
        }
    }
    if (cr != null) {
        cr.setOffset(calculateConnOffset());
    }
    return figure;
}
Also used : LookupConnectionRouter(org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter) CurveConnectionRouter(org.talend.designer.gefabstractmap.figures.routers.CurveConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 2 with LookupConnectionRouter

use of org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter in project tdi-studio-se by Talend.

the class LookupConnectionPart method createFigure.

@Override
protected IFigure createFigure() {
    PolylineConnection connection = new PolylineConnection();
    connection.setTargetDecoration(new PolygonDecoration());
    // connection.setBackgroundColor(ColorConstants.yellow);
    connection.setForegroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_UNSELECTED_LOOKUP_LINKS));
    connection.setLineWidth(2);
    cr = new LookupConnectionRouter();
    connection.setConnectionRouter(cr);
    return connection;
}
Also used : LookupConnectionRouter(org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter) PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Aggregations

PolylineConnection (org.eclipse.draw2d.PolylineConnection)2 LookupConnectionRouter (org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter)2 PolygonDecoration (org.eclipse.draw2d.PolygonDecoration)1 CurveConnectionRouter (org.talend.designer.gefabstractmap.figures.routers.CurveConnectionRouter)1