Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How can I create the connection line like in the figure(How can I create the connection line like in the figure)
How can I create the connection line like in the figure [message #630456] Sat, 02 October 2010 17:23 Go to next message
Ismail Bayraktar is currently offline Ismail BayraktarFriend
Messages: 4
Registered: October 2010
Junior Member
How can I create a connection line like figure in the following link:

http://www.processuniverse.net/img/succession.png

I have looked for Polyline Connection but It just has an aggregation figure and closed arrow. Could you please help me?
Thanks,
Ismail
Re: How can I create the connection line like in the figure [message #630469 is a reply to message #630456] Sun, 03 October 2010 00:32 Go to previous messageGo to next message
Fernando Herrera is currently offline Fernando HerreraFriend
Messages: 49
Registered: January 2010
Member
For the polilyne in the gmpgraph you have to define a source a target decoration and these have to be a circle figure
Re: How can I create the connection line like in the figure [message #630585 is a reply to message #630469] Mon, 04 October 2010 09:37 Go to previous messageGo to next message
Ismail Bayraktar is currently offline Ismail BayraktarFriend
Messages: 4
Registered: October 2010
Junior Member
Yeap, you are rigth. Polyline connection allows to select target and source decoration. How we can draw a circle to the target or source decoration?

Is there a predefined figure library for that?

Thanks for your answer,
Ismail.
Re: How can I create the connection line like in the figure [message #630769 is a reply to message #630456] Mon, 04 October 2010 21:24 Go to previous messageGo to next message
Ismail Bayraktar is currently offline Ismail BayraktarFriend
Messages: 4
Registered: October 2010
Junior Member
By creating a Polygon Decoration using different coordinates I managed to draw a circle for source decoration and an arrow with circle for target decoration.

However, I could not find how I can triple the line in between.

There are a few options : LINE_SOLID; LINE_DASH,..
And there is LINE_CUSTOM.

Anyone knows how LINE_CUSTOM works??
Re: How can I create the connection line like in the figure [message #632183 is a reply to message #630769] Mon, 11 October 2010 23:40 Go to previous messageGo to next message
Fernando Herrera is currently offline Fernando HerreraFriend
Messages: 49
Registered: January 2010
Member
Hi a Line custom needs to be defined for you. You should extend or define a custom line with the behaviour you want in another class.
Re: How can I create the connection line like in the figure [message #632185 is a reply to message #632183] Mon, 11 October 2010 23:46 Go to previous messageGo to next message
Ismail Bayraktar is currently offline Ismail BayraktarFriend
Messages: 4
Registered: October 2010
Junior Member
So then how and where should I tell eclipse use my custom class called xyz as custom line.

And do you have samples for that custom line class or at least what is your idea about that custom line class. How should at be at least?

Cheers,
Ismail.
Re: How can I create the connection line like in the figure [message #632702 is a reply to message #632185] Thu, 14 October 2010 00:10 Go to previous messageGo to next message
Fernando Herrera is currently offline Fernando HerreraFriend
Messages: 49
Registered: January 2010
Member
If I'm not wrong LINE_CUSTOM is a style of line not a line. You need to go to the edipart of this figure and in the class who extends the polilyne connection with the decorators you should code the this figure. I think this is a compound polilyne with three polilynes. I don't know if you can do this work easily. Maybe you will need to redefine some methods that GMF invoque over the figure of that connectioneditpart, so I don't know a easy way to deal with this issue.

Regards

Fernando
Re: How can I create the connection line like in the figure [message #692589 is a reply to message #632702] Mon, 04 July 2011 19:49 Go to previous messageGo to next message
wifsimster is currently offline wifsimsterFriend
Messages: 1
Registered: July 2011
Location: Sherbrooke, Qu├ębec, Cana...
Junior Member

Hi,

I'm interested in your subject of connection line, have you solved your problem?
Re: How can I create the connection line like in the figure [message #697093 is a reply to message #692589] Fri, 15 July 2011 14:22 Go to previous message
Andreas  is currently offline Andreas Friend
Messages: 19
Registered: October 2009
Junior Member
Hi,

I don`t understand your issue right, but maybe this is a clue:

I wanted to draw a double-line-connection (without crossing lines in any state) some time ago.
My solution was to extend my own/changed polylineconnectionex in the editpart of the connection you want to have a doubleline.
for me it was something like this:

public class ConnectionFigure extends MyChangedPolylineconnectionex

In this extended file i did the work at "outlineShape(Graphics g)" through simply draw a second line using the following code and some do-not-cross-lines-logic:

PointList mylist1 = displayPoints.getCopy();
PointList mylist2 = displayPoints.getCopy();
mylist1.translate(0 , -2);
mylist2.translate(0, 2);
g.drawPolyline(mylist1);
g.drawPolyline(mylist2);

see attachted file

maybe not the best way but still works for me


kind regards,
Andreas
Previous Topic:Render in-memory GMF Diagram on a SWT Composite/Canvas
Next Topic:GMF & EMF Validation: Flush of Undo/Redo history
Goto Forum:
  


Current Time: Mon Mar 01 08:00:38 GMT 2021

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

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

Back to the top