Connection Decorator with Text [message #1007999] |
Fri, 08 February 2013 09:42  |
Eclipse User |
|
|
|
I am trying to create a Connection Decorator, a circle with some text inside the circle, along a Connection. I am able to display the circle, but for some unknown reason the text inside the circle is not being displayed.
Here is the code that I am trying to use.
ConnectionDecorator cd = peCreateService.createConnectionDecorator(connection, false, 0.7, true);
Ellipse ellipse = gaService.createEllipse(cd);
ellipse.setForeground(manageColor(IColorConstant.BLACK));
ellipse.setBackground(manageColor(IColorConstant.WHITE));
ellipse.setLineWidth(0);
gaService.setSize(ellipse, 15, 15);
Text text = gaService.createPlainText(ellipse, "AA");
text.setStyle(StyleUtils.getStyleForTextDecorator((getDiagram())));
gaService.setLocation(text, 0, 0);
I am wondering what I am doing wrong? or if it is possible to have text inside a Connection Decoration?
Thanks
|
|
|
|
|
Re: Connection Decorator with Text [message #1009722 is a reply to message #1008701] |
Fri, 15 February 2013 10:34  |
Eclipse User |
|
|
|
Jon,
it would be great if you would contribute that.
If you mean with respect to the sources and how to set up a Graphiti
workspace you should check our wiki at
http://wiki.eclipse.org/GMP/Graphiti#Working_on_Bugzillas_.28Contributions_and_Commiting.29
If you mean with respect to coding the functionality against GEF, that will
be more difficult. The functionality itself could become quite tricky as it
would involve implementing rotation functionality for different kinds of GEF
shapes. But you might start with the editing parts
(ConnectionDecoratorEditPart) and figures (GFAbstractRotatableDecoration
AFAIK from the top of my mind) for the connection decorators.
HTH,
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.05956 seconds