polyline connection color [message #153373] |
Thu, 04 October 2007 08:52 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 13:55 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
|
|
|
Re: polyline connection color [message #153492 is a reply to message #153469] |
Thu, 04 October 2007 14:51 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: 14.08.99.gmx.de
Hi,
I regenerated both (gmfgen and diagram code).
I wonder about the background-thing, because this works the way I
expected it. But this doesn't change the color of the connection (junst
the decoration). So there has to be another problem with it.
This is the part of the gmfgraph:
********
<descriptors
name="MyPolylineConnectionFigure">
<actualFigure
xsi:type="gmfgraph:PolylineConnection"
name="MyPolylineConnectionFigure">
<foregroundColor
xsi:type="gmfgraph:RGBColor"
red="255"/>
<targetDecoration
xsi:type="gmfgraph:PolylineDecoration"
href=" ../../../plugin/org.eclipse.gmf.graphdef/models/classDiagram .gmfgraph#//@figures.0/@figures.2 "/>
</actualFigure>
</descriptors>
********
I tried it without decoration but still no effect...
Regards,
Guido
|
|
|
|
Powered by
FUDForum. Page generated in 0.03573 seconds