How to set line colour of rectangles in GMF [message #209668] |
Tue, 28 October 2008 03:06  |
Eclipse User |
|
|
|
Hi,
I try to set the line color of my GMF figures as follows.
In gmfgraph model I have
<actualFigure
xsi:type="gmfgraph:Rectangle"
name="TableFigure">
<layout
xsi:type="gmfgraph:GridLayout">
<margins/>
<spacing/>
</layout>
<foregroundColor
xsi:type="gmfgraph:RGBColor"
red="100"
green="100"
blue="100"/>
In the generated code this results in something like
static final Color THIS_FORE = new Color(null, 100, 100, 100);
this.setForegroundColor(THIS_FORE);
createContents();
However my rectangle lines are still black and the setting seems to be
ignored.
How can I customize the line color of Rectangle figures and comparments?
Peter
|
|
|
|
Re: How to set line colour of rectangles in GMF [message #209714 is a reply to message #209701] |
Tue, 28 October 2008 09:05  |
Eclipse User |
|
|
|
Alex Shatalin schrieb:
> Hello exquisitus,
>
>> static final Color THIS_FORE = new Color(null, 100, 100, 100);
> ...
>
>> However my rectangle lines are still black and the setting seems to be
>> ignored.
>
> Well, RGB(100, 100, 100) is rather black ;-) (see attachement). By default all the lines should be "grey" see http://www.eclipse.org/modeling/gmf/gallery/bpmn.png.
> So, are you sure your custom color was ignored?
>
> -----------------
> Alex Shatalin
>
>
> ------------------------------------------------------------ ------------
>
Alex, thanks.
You are right - I drew the wrong conclusions.
I changed the color in the Java code while debugging and wondered why it
didn't change in the editor - however when I start with a new
workspace and a new diagram the change is reflected.
|
|
|
Powered by
FUDForum. Page generated in 0.26558 seconds