Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » connection color depending on exisiting of its children
connection color depending on exisiting of its children [message #88663] Mon, 01 January 2007 20:53 Go to next message
Eclipse UserFriend
In my model an connection can have many filters.
I need to mark somehow on diagram my link iff exists any filter.

I tried changing of link color using idea presented in thread "changing
connection color programtically". I put this command to
handleNotification for my ArrowEditPart and it was working (link color
changed when I created/removed its children). But than I do not know
where to run this command when my figures are created (i rebuild my
diagram very often - it depends which layer is selected by user).

I do not like idea with running color command, because it is complex and
I suppose it can work a little bit too long for many connections
switching very often.

I do not need do save in notation (semantic is persistent/sych!) model
my elements graphical parameters , so maybe I can switch this somehow off?

Or maybe I can add some middle decorator for my arrow listening to the
counter for my arrow filters (maybe some bulb).
I tried also with link feature label, but it needs connectin to real
attribute, my counter is 'virtual'

Thanx for any ideas
Wiktor
Re: connection color depending on exisiting of its children [message #88863 is a reply to message #88663] Tue, 02 January 2007 13:49 Go to previous message
Eclipse UserFriend
Hello Wiktor,

Concerning creation of the connection I think you can initialize line colour
in corresponding EditPart constructor.

To not store colour in notation model (+ diagram file) you should not set
"LineStyle" for the corresponding notation model (View) instance. Te easiest
way AFAIK is to set any forground colour for link figure in .gmfgraph model,
re-create .gmfgen model and re-generate the code. As a result you should
be able to control line colour by just setting corresponding colour to the
corresponding figure from the code.

-----------------
Alex Shatalin
Previous Topic:Unlimited nesting - how?
Next Topic:SuperTypes and Connection Handlers
Goto Forum:
  


Current Time: Mon Nov 10 13:25:59 EST 2025

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

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

Back to the top