polyline connection color [message #153373] |
Thu, 04 October 2007 04:52  |
Eclipse User |
|
|
|
Originally posted by: 14.08.99.gmx.de
Hi,
I want to change the color of a polyline connection, but it doesn't work
the 2 ways I tried (wich I found in former posts of this ng):
- adding an "Foreground Color RGB Color" to the Figure Descriptor in the
*.gmfgraph
- adding the code snippet below to the <MyPolyline>ViewFactory-Class
***
LineStyle lineStyle = (LineStyle)
view.getStyle(NotationPackage.Literals.LINE_STYLE);
if (lineStyle != null) {
lineStyle.setLineColor(FigureUtilities.RGBToInteger(
new RGB(255, 0, 0)).intValue());
}
***
Maybe it's bcause I'm new ;)
I'm using Eclipse 3.3, GMF Europa 2.0.0.
Regards,
Guido
|
|
|
Re: polyline connection color [message #153469 is a reply to message #153373] |
Thu, 04 October 2007 09:55   |
Eclipse User |
|
|
|
Originally posted by: jakub.jurkiewicz.gmail.com
Hi Guido,
I tried the first way you described (and which I think that is better)
and it worked well.
Remember that after changing the gmfgraph file, you have to regenerate
the generatol model (gmfgen) and (later) regenerate the diagram code.
Hope this helps,
Jakub Jurkiewicz
http://eclipser-blog.blogspot.com/
Guido Schwab pisze:
> Hi,
>
> I want to change the color of a polyline connection, but it doesn't work
> the 2 ways I tried (wich I found in former posts of this ng):
> - adding an "Foreground Color RGB Color" to the Figure Descriptor in the
> *.gmfgraph
> - adding the code snippet below to the <MyPolyline>ViewFactory-Class
> ***
> LineStyle lineStyle = (LineStyle)
> view.getStyle(NotationPackage.Literals.LINE_STYLE);
> if (lineStyle != null) {
> lineStyle.setLineColor(FigureUtilities.RGBToInteger(
> new RGB(255, 0, 0)).intValue());
> }
> ***
> Maybe it's bcause I'm new ;)
> I'm using Eclipse 3.3, GMF Europa 2.0.0.
>
> Regards,
> Guido
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04592 seconds