Width of polyline doesn't reflect on the diagram [message #1252504] |
Fri, 21 February 2014 09:30 |
Djordje Stanojevic Messages: 14 Registered: February 2014 |
Junior Member |
|
|
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;
Djordje Stanojevic
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03663 seconds