문제

I am trying to set width and color of connection line in draw2d. I found method "setLineWidth()" method but on what I need to call this method. I call this method on input port object but did not work. Plz help me.

도움이 되었습니까?

해결책

Can you please post some of your code? This is working for me:

    PolylineConnection connection = new PolylineConnection();
    connection.setLineWidth(2);
    connection.setSourceAnchor(new ChannelStartAnchor(this));
    connection.setTargetAnchor(new ChannelEndAnchor(figure));


    Display display = Display.getCurrent();
    final Color connectionColorHoover = display.getSystemColor(SWT.COLOR_RED);
    final Color connectionColor = new Color(display,54,82,111);
    connection.setBackgroundColor(connectionColor);
    connection.setForegroundColor(connectionColor);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top