|
Re: Dashed Connections [message #660703 is a reply to message #660471] |
Mon, 21 March 2011 09:45 |
Michael Wenz Messages: 1931 Registered: July 2009 Location: Walldorf, Germany |
Senior Member |
|
|
This appears to be a bug. In order for the Graphiti framework to use the
line style set at the style object, the value at the GA needs to be
LineStyle.UNSPECIFIED. Since this is not set as default for the attribute at
AbstractStyle, the framework uses SOLID (0, standard default value). As a
workaround you may set the value at the Polyline explicitly to UNSPECIFIED.
Could you please open a bugzilla to track this? Thanks!
Michael
"Ali" wrote in message news:ilvr3m$q9g$1@news.eclipse.org...
Hi,
I would like to create dashed connection:
I can create my dashed connection with the code below and it works fine:
IGaService gaService = Graphiti.getGaService();
Polyline polyline = gaService.createPolyline(connection);
polyline.setLineWidth(2);
polyline.setForeground(manageColor(IColorConstant.BLACK));
polyline.setLineStyle(LineStyle.DASH);
But, if I create a style and then set the style on the polyline as shown
below, it doesn't work:
IGaService gaService = Graphiti.getGaService();
dashedStyle = gaService.createStyle(diagram, styleId);
dashedStyle.setLineStyle(LineStyle.DASH);
dashedStyle.setLineWidth(2);
dashedStyle.setForeground(gaService.manageColor(diagram,ICol orConstant.BLACK));
polyline.setStyle(dashedStyle);
Do I miss something ??
Thank you in advance,
Ali
|
|
|
Re: Dashed Connections [message #661053 is a reply to message #660703] |
Tue, 22 March 2011 22:43 |
Ali Messages: 18 Registered: July 2009 |
Junior Member |
|
|
Le 21/03/2011 10:45, Michael Wenz a écrit :
> This appears to be a bug. In order for the Graphiti framework to use the
> line style set at the style object, the value at the GA needs to be
> LineStyle.UNSPECIFIED. Since this is not set as default for the
> attribute at AbstractStyle, the framework uses SOLID (0, standard
> default value). As a workaround you may set the value at the Polyline
> explicitly to UNSPECIFIED.
>
> Could you please open a bugzilla to track this? Thanks!
>
> Michael
>
>
> "Ali" wrote in message news:ilvr3m$q9g$1@news.eclipse.org...
Hi again,
I Opened a bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=340712
Ali
>
> Hi,
>
> I would like to create dashed connection:
>
> I can create my dashed connection with the code below and it works fine:
>
> IGaService gaService = Graphiti.getGaService();
> Polyline polyline = gaService.createPolyline(connection);
> polyline.setLineWidth(2);
> polyline.setForeground(manageColor(IColorConstant.BLACK));
> polyline.setLineStyle(LineStyle.DASH);
>
> But, if I create a style and then set the style on the polyline as shown
> below, it doesn't work:
>
> IGaService gaService = Graphiti.getGaService();
> dashedStyle = gaService.createStyle(diagram, styleId);
> dashedStyle.setLineStyle(LineStyle.DASH);
> dashedStyle.setLineWidth(2);
> dashedStyle.setForeground(gaService.manageColor(diagram,ICol orConstant.BLACK));
>
>
> polyline.setStyle(dashedStyle);
>
> Do I miss something ??
>
> Thank you in advance,
> Ali
|
|
|
Powered by
FUDForum. Page generated in 0.03594 seconds