Skip to main content



      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 02:28 Go to next message
Eclipse UserFriend
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 04:59 Go to previous messageGo to next message
Eclipse UserFriend
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 05:16 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 05 September 2012 21:57 Go to previous messageGo to next message
Eclipse UserFriend
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 11:46 Go to previous message
Eclipse UserFriend
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: Sun Jul 27 09:01:45 EDT 2025

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

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

Back to the top