Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing visual attributes based on model attribute values?
Changing visual attributes based on model attribute values? [message #76095] Wed, 08 November 2006 19:29 Go to next message
Eclipse UserFriend
How can one change visual attributes (e.g. a connection's line pattern
between solid and dashed or its color) depending on the value of a
boolean or enumeration attribute in the model? E.g. I would like to
automatically toggle a connection's line pattern between solid and
dashed depending on a boolean flag "optional".

Is there a "declarative" way (i.e. via .gmfgraph and .gmfmap file) or is
there no other way than modifying the generated diagram code?

Michael
Re: Changing visual attributes based on model attribute values? [message #77766 is a reply to message #76095] Wed, 15 November 2006 09:07 Go to previous message
Eclipse UserFriend
Originally posted by: 5d5.mail.ru

There is no "declarative" way, sorry (((

Here is an outline:

1. When link edit part creates it's figure check model and set figure
style as needed.

2. Override handleNotificationEvent(...) method in link edit part and
detect boolean attribute update in model; set link figure style if needed.

Michael Moser wrote:
> How can one change visual attributes (e.g. a connection's line pattern
> between solid and dashed or its color) depending on the value of a
> boolean or enumeration attribute in the model? E.g. I would like to
> automatically toggle a connection's line pattern between solid and
> dashed depending on a boolean flag "optional".
>
> Is there a "declarative" way (i.e. via .gmfgraph and .gmfmap file) or is
> there no other way than modifying the generated diagram code?
>
> Michael
>
>
Previous Topic:EMF properties view, with EMF attributes
Next Topic:label showing as <...>
Goto Forum:
  


Current Time: Fri May 30 16:57:49 EDT 2025

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

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

Back to the top