| Rendering decorators for connections [message #560011] |
Mon, 20 September 2010 13:36  |
Shenxue Zhou Messages: 50 Registered: July 2009 |
Member |
|
|
In the Tutorial example, a warning decorator was added to the EClass pictogram when the EClass name started with a lower case letter.
Is it possible to add an image decorator for connection text decorator? My use case is I want to model a process flow using connections. I use a text decorator on the connection to represent the flow name. I want to display some warning icon in front of the process flow name when for an invalid process flow. I tried to add a image decorator to the tool behavior following the Tutorial example. But it didn't work.
Is this type of decorator supported? If so, could you show me some code in the context of the Tutorial example? Thanks!
Shenxue
|
|
|
| Re: Rendering decorators for connections [message #626289 is a reply to message #560011] |
Wed, 22 September 2010 09:42  |
Matthias Gorning Messages: 80 Registered: April 2010 Location: Germany |
Member |
|
|
There was a small bug in the framework. I have fixed it today.
Now you can provide an image decorator for your ConnectionDecorator via the ToolBehaviorProvider. You can do it in the same way, as we did it in our tutorial for the ECLass.
One remark: Currently you must place your image decorator in the visible area - that means inside the text decorator. You can set the location with:
ImageDecorator imageRenderingDecorator = new ImageDecorator(IPlatformImageConstants.IMG_ECLIPSE_ERROR_TSK );
imageRenderingDecorator.setX(0);
imageRenderingDecorator.setY(0);
We will work on a solution to place it in front of the text decorator. But this needs some time.
Regards,
Matthias
[Updated on: Wed, 22 September 2010 09:46] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01452 seconds