Drawing 2 different connections for same source and target pictograms [message #1011858] |
Wed, 20 February 2013 06:38  |
Eclipse User |
|
|
|
I have two rectangular pictograms.I need to connect this two rectangles with two different connectors.
I am using Manhattan connections.
Right now the two different connectors can be drawn but they overlap over each other.So the other one is hidden. And user does not know of the other connection.
How can I define 2 different connection points, so I can draw 2 connectors which are connected to source and target at 2 different points?
|
|
|
|
|
|
|
|
Re: Drawing 2 different connections for same source and target pictograms [message #1012917 is a reply to message #1012380] |
Fri, 22 February 2013 08:02  |
Eclipse User |
|
|
|
Saniya,
classical answer: that depends... ;-)
You can create the anchors in both features you mentioned. Doing it in the
add feature of your shape will basically mean you have a fixed list of
positions you want users to allow the creation of connections to, while
adding them on connection creation will allow an arbitrary number of
connection anchors.
When you want to create them on connection creation you should still have a
chopbox anchor for your shpae users will use to create new connections. In
the create connection feature on create you will get this chopbox anchor
passed within the context. You will then need to create new anchors, set
them in the context and create the connection between these new anchors. I
think the chess example does something similar, at least in respect to
exchanging the anchors to be used on connection creation.
A self connection is basically a normal connection, the difference is that
it simply ends on the same shape or even the same anchor. You should ensure
that you use a connection the user can see, e.g. a freeform connection with
some bendpoints in it. A direct connection would not be usable here, because
it would end up in just one point which may additionally be hidden
underneath the shape.
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.05886 seconds