Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Rendering decorators for connections
Rendering decorators for connections [message #560011] Mon, 20 September 2010 17:36 Go to next message
Shenxue Zhou is currently offline 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 13:42 Go to previous message
Matthias Gorning is currently offline Matthias Gorning
Messages: 81
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 13:46]

Report message to a moderator

Previous Topic:Loading diagram provider when graphiti editor is to open
Next Topic:Put one shape above another using dnd
Goto Forum:
  


Current Time: Sat Sep 20 00:10:47 GMT 2014

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

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