Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to set line colour of rectangles in GMF
How to set line colour of rectangles in GMF [message #209668] Tue, 28 October 2008 07:06 Go to next message
No real name is currently offline No real nameFriend
Messages: 7
Registered: July 2009
Junior Member
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 #209701 is a reply to message #209668] Tue, 28 October 2008 11:15 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
----++Omea_Parts_Splitter.0438895691390566
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello=20exquisitus,

> =20static=20final=20Color=20THIS=5fFORE=20=3d=20new=20Color( null,=20100,=20100,=20100);
=2e=2e=2e

> =20However=20my=20rectangle=20lines=20are=20still=20black=20 and=20the=20setting=20seems=20to=20be
>=20ignored=2e

Well,=20RGB(100,=20100,=20100)=20is=20rather=20black=20;-)=2 0(see=20attachement)=2e=20By=20default=20all=20the=20lines=2 0should=20be=20 "grey"=20see= 20http://www=2eeclipse=2eorg/modeling/gmf/gallery/bpmn=2epng =2e
So,=20are=20you=20sure=20your=20custom=20color=20was=20ignor ed?

-----------------
Alex=20Shatalin

----++Omea_Parts_Splitter.0438895691390566
Content-Type: image/x-png; name="Color_100_100_100.PNG"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Color_100_100_100.PNG"

iVBORw0KGgoAAAANSUhEUgAAADYAAABACAIAAADeXBNWAAAAAXNSR0IArs4c
6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUw
AADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAASdAAAEnQB3mYfeAAAALBJREFU
aEPt14ENgCAQQ1Hclf1XQN3hN7mGzwDN8SwQn3POGr6+EYevNXy+/yM7IiDQ
oLjHrwZFoCzhCBUJYBVVJASIjIYujn9c9ioYkWhLNqOhi1kBIl1FFQkBIsMu
3qJY8AA6IiDgib7lRBP7zGbYRcJXRUQRuFvDEQ0/qWECIL5BkSh0NsNLh/BV
UUVCgMiwi7coAo9oOKLhjQ4TAPEqAojbe/GWe5HYZzbDLhK+LyyQ+8bShcvu
AAAAAElFTkSuQmCC
----++Omea_Parts_Splitter.0438895691390566--
Re: How to set line colour of rectangles in GMF [message #209714 is a reply to message #209701] Tue, 28 October 2008 13:05 Go to previous message
No real name is currently offline No real nameFriend
Messages: 7
Registered: July 2009
Junior Member
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.
Previous Topic:GMF and OAW completion
Next Topic:[Announce] GMF 2.2.0 I200810281602 is available
Goto Forum:
  


Current Time: Tue Jan 19 06:54:20 GMT 2021

Powered by FUDForum. Page generated in 0.01849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top