Change the graphic aspect of an element according to the value of one of its attributes [message #538352] |
Mon, 07 June 2010 12:55 |
Dewas Messages: 21 Registered: March 2010 Location: Toulouse (France) |
Junior Member |
|
|
Hello!
I would like change the graphic aspect of an element in my editors according to the value of an attribute of this element.
For example, I have an object X with an attribute S. If S = 0, my object is in blue. If S = 1, my object is in red. If the value changes, the color also changes.
For that purpose, I need to reach several things which I don't find...
First, I need to reach the attributes of my object directly in the corresponding class XXXeditpart.java. Because it is in this class that I define the graphic appearance of my object.
Are there somebody that knows how to reach the current element or the element selected by programming? To be able to read its attributes?
Then, are there somebody that knows how to verify the valuable changes of the attribute and to make update the display?
I could use a listener, but I could also make the update of the display in the method which applies the modifications of one attributes.
Thank in advance for your help!
Albert
DEWAS Albert
Master Degree in the IUP Intelligent Systems
Trainee to Continental Corporation Toulouse
[Updated on: Wed, 09 June 2010 14:41] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03636 seconds