Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Connection Decorator with Text
Connection Decorator with Text [message #1007999] Fri, 08 February 2013 09:42 Go to previous message
Jon Kurisu is currently offline Jon Kurisu
Messages: 3
Registered: July 2009
Junior Member
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Newbie Question
Next Topic:Graphiti Diagram doesn't load on startup
Goto Forum:
  


Current Time: Wed May 22 13:34:08 EDT 2013

Powered by FUDForum. Page generated in 0.02141 seconds