Width of polyline doesn't reflect on the diagram [message #1252504] |
Fri, 21 February 2014 04:30  |
Eclipse User |
|
|
|
Hi all,
I have set width of polyline in add method of my AddConnectionFeature, but it is not reflected on the diagram. The line is still very thin. Does anybody know where the problem is? Here is my add method
public PictogramElement add(IAddContext context) {
IAddConnectionContext addConContext = (IAddConnectionContext) context;
EReference addedEReference = (EReference) context.getNewObject();
IPeCreateService peCreateService = Graphiti.getPeCreateService();
// CONNECTION WITH POLYLINE
Connection connection = peCreateService.createManhattanConnection(getDiagram());
connection.setStart(addConContext.getSourceAnchor());
connection.setEnd(addConContext.getTargetAnchor());
IGaService gaService = Graphiti.getGaService();
Polyline polyline = gaService.createPolyline(connection);
polyline.setWidth(2);
polyline.setForeground(manageColor(E_REFERENCE_FOREGROUND));
link(connection, addedEReference);
return connection;
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.27876 seconds