Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Text background color is ignored
Text background color is ignored [message #735798] Wed, 12 October 2011 14:18 Go to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 180
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I'm not sure if this is expected behaviour. But if I set the backgroundColor of a Text PE , it is not shown, even if I set setFilled(true) . It seems to me (but I'm not sure) that the rendered should honour this flag. It's as simple as changing

  label.setOpaque(false);


by

  label.setOpaque(text.getFilled());


in

PictogramElementDelegate.refreshFigureForGraphicsAlgorithm() : 523
(also in the MultiText block).

[Updated on: Wed, 12 October 2011 14:18]

Report message to a moderator

Re: Text background color is ignored [message #735802 is a reply to message #735798] Wed, 12 October 2011 14:37 Go to previous messageGo to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 180
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
Update: some unfortunate fact: a Text (an AbstractSytle) has a default filled=true (why??), as defined in graphiti.ecore so tha above change could affect some users... Sad

I hence suggest to set explicittly setFilled(false) in
GaServiceImpl.setDefaultTextAttributes()

[Updated on: Wed, 12 October 2011 14:39]

Report message to a moderator

Re: Text background color is ignored [message #735950 is a reply to message #735802] Thu, 13 October 2011 03:26 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1574
Registered: July 2009
Location: Walldorf, Germany
Senior Member
It seems as if the intention was that texts should not have a backgroud set,
but always reflect the background of their container. If you would need that
possibility we need to think of a compatible way to introduce it. Would you
open an enhancement bugzilla for that?

Michael
Re: Text background color is ignored [message #736027 is a reply to message #735950] Thu, 13 October 2011 07:45 Go to previous message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 180
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360800
Previous Topic:Correct way to call delete programatically
Next Topic:Layouting algorithm for References
Goto Forum:
  


Current Time: Mon Jul 28 20:35:36 EDT 2014

Powered by FUDForum. Page generated in 0.02975 seconds