Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to change color by changing of properties value
how to change color by changing of properties value [message #906333] Sat, 01 September 2012 06:28 Go to next message
Iqbal Hossain is currently offline Iqbal HossainFriend
Messages: 101
Registered: May 2011
Location: Bangladesh
Senior Member
hello all,
suppose in my diagram there are several nodes like: NODE1, NODE2. and they have some properties like length, start time, end time.
there should be some constrains like length should be less then 10. difference between start time and end time is 120 sec. if it doesn't fulfill this limitation the NODE should become RED.So I need your help...
Re: how to change color by changing of properties value [message #907076 is a reply to message #906333] Mon, 03 September 2012 08:59 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

you can use the new GMF 3.0 functionality to do so. In your graphical model define a diagram pin (Color pin) for this. In the GMFMap model you can define a constraint (Visual Effect Mapping) on when to use which. Alternatively you can hard code it into yout editparts. Here is an Example for one of my templates: http://code.google.com/a/eclipselabs.org/p/melanie/source/browse/de.uni_mannheim.informatik.swt.models.gmf/templates/aspects/diagram/editparts/NodeEditPart.xpt Take a look at updateView() and from where it is called.

Ralph
Re: how to change color by changing of properties value [message #907089 is a reply to message #907076] Mon, 03 September 2012 09:16 Go to previous messageGo to next message
Iqbal Hossain is currently offline Iqbal HossainFriend
Messages: 101
Registered: May 2011
Location: Bangladesh
Senior Member
thnx for the reply..... but what u have told is for advanced user. I am a beginner. I am trying my best to understand. If u have something simple please let me know...
Re: how to change color by changing of properties value [message #908783 is a reply to message #907089] Thu, 06 September 2012 01:57 Go to previous messageGo to next message
Iqbal Hossain is currently offline Iqbal HossainFriend
Messages: 101
Registered: May 2011
Location: Bangladesh
Senior Member
I have created a pin. i dont understand what to write in Ocl Expression under VIsual Effect mapping and how to relate it with background color?
Re: how to change color by changing of properties value [message #1085214 is a reply to message #908783] Mon, 12 August 2013 15:46 Go to previous message
Nicolas Scardilla is currently offline Nicolas ScardillaFriend
Messages: 15
Registered: April 2013
Junior Member
They could basically explain how the element "visual effect mapping" ?
Previous Topic:i want to learn gmf but no person can guide me
Next Topic:Multiple Views on a same domainElement
Goto Forum:
  


Current Time: Thu Apr 25 12:07:45 GMT 2024

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

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

Back to the top