Question

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.

Était-ce utile?

La solution

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);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top