Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Change color of figure/compartment from editor
Change color of figure/compartment from editor [message #486356] Thu, 17 September 2009 12:08 Go to next message
Eclipse UserFriend
Originally posted by: laura.hernandez.dunait.es

Hi all,

this is a simple question but I didn't get the solution.

I create a rectangle figure. I set foreground/background colors in the
creation of that figures in my EditPart.

When I try to change the colors of these figures in runtime from the
contextual menu or from the properties section, I don't see any change in
my diagram...but the dirty flag has been changed!

If I don't set the colors in creation time, then I can change the colors
without problems...

Any help will be appreciated a lot!!

Laura.
Re: Change color of figure/compartment from editor [message #486404 is a reply to message #486356] Thu, 17 September 2009 14:10 Go to previous messageGo to next message
Artur Kronenberg is currently offline Artur KronenbergFriend
Messages: 159
Registered: August 2009
Senior Member
Hi Laura,

I had a similar problem with highlighting a figure, since I had to draw a
custom rectangle in my IFigure. I solved the problem by calling repaint on
that IFigure.

Hope that will also solve your problem.

Best regards,
Artur
Re: Change color of figure/compartment from editor [message #486461 is a reply to message #486404] Thu, 17 September 2009 18:20 Go to previous message
Eclipse UserFriend
Originally posted by: laura.hernandez.dunait.es

Thanks for your answer Artur,

I tried as you said setting the backgroundColor of the figure and
recalling the function repaint() the figure. I see the figure's color
changed.

But when saving the diagram, this color has not been saved and it puts
again the initial color...

did you have the same problem? How can I get this color change persistent?

Thanks a lot.
Previous Topic:Changing the OpenDiagramBehaviour
Next Topic:multiple org.eclipse.emf.edit.itemProviderAdapterFactories extension points
Goto Forum:
  


Current Time: Wed Apr 24 18:33:22 GMT 2024

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

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

Back to the top