Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Color of Text in MultiText(Color is not reflected as set in its properties)
Color of Text in MultiText [message #1221722] Wed, 18 December 2013 09:48 Go to next message
Kunal Prasad is currently offline Kunal PrasadFriend
Messages: 18
Registered: September 2009
Junior Member

I have created a MultiText object in Graphiti Diagram [version 0.9.2] as below:

MultiText text = gas.createDefaultMultiText(diagram,
labelRectangle,"New Element");

After which I have set its foreground property explicitly:

text.setForeground(gas.manageColor(diagram, new ColorConstant("004080")Wink);

Once the Node is created with the text as above, its foreground color is always black and the font is bold.

I checked the diagram model and found as below:

<graphicsAlgorithmChildren xsi:type="al:MultiText" xmi:id="_88I6FmQVEeO4IZ33Wr4LFg" foreground="_8jz5oGQVEeO4IZ33Wr4LFg" lineWidth="1" filled="false" transparency="0.0" width="89" height="20" font="_YKBnsGGlEeOVAvXQuPiOFA" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_TOP" value="New Element"/>

<colors xmi:id="_8jz5oGQVEeO4IZ33Wr4LFg" green="64" blue="128"/>

However, The color in the canvas remains black, Please suggest what could be reason behind this inconsistency and how I can solve it.

Thanks & Regards,
Re: Color of Text in MultiText [message #1221879 is a reply to message #1221722] Wed, 18 December 2013 15:50 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1927
Registered: July 2009
Location: Walldorf, Germany
Senior Member

hm, that looks good so far and should do it. Are there any exceptions in the
Eclipse error log?

BTW: there is a working example in the Sketch test tool, see class

Previous Topic:MultiText bounds
Next Topic:Active Shapes problem
Goto Forum:

Current Time: Tue Aug 03 03:24:12 GMT 2021

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

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

Back to the top