How modelize & control & draw n-m / multivalued relationships with GEF? [message #25944] |
Wed, 09 October 2002 09:19  |
Eclipse User |
|
|
|
Hello,
I was wondering if it would be possible with GEF to have n-m connections
instead of just 1-1 connections.
What I mean by n-m connection can be:
1) a connection starting from *one* node, but having several anchors (n) on
this node, and goind to another target node also having (m) connection
endpoints. The visual for this connection could be a kind of fork like this:
\ /
_\_________________________/_
/ \
/ \
2) a connection from n distinct nodes to m disctinct nodes
3) a mix of 1) and 2)
Is this possible with current GEF API?
If YES, what should I return from getModelSourceConnections() /
getModelTargetConnections() in either case when these methods are called on
my nodes?
LAST QUESTION: is it possible to make a self-connection with (1) case ?
Best regards,
Alex.
|
|
|
Re: How modelize & control & draw n-m / multivalued relationships with GEF? [message #26228 is a reply to message #25944] |
Wed, 09 October 2002 10:31  |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
You can get this to work 2 ways.
a) the relationship is itself a child of the diagram, and every link to a
node is a "GEF connection". So for a 3-way relationship, you would have the
relationship itself, and 3 connection editparts. You can do this without
enforcing anything in your model. Also, you selection support in GEF is
flexible enough to prevent the 3 connection editpart from being selected. A
variation on this might be that you start off with a 2-way relationship, and
additional links are implemented as connections-to-connections.
b) You subclass or write you own ConnectionEditPart that handles this.
"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:ao18ve$nik$1@rogue.oti.com...
> Hello,
>
> I was wondering if it would be possible with GEF to have n-m connections
> instead of just 1-1 connections.
> What I mean by n-m connection can be:
>
> 1) a connection starting from *one* node, but having several anchors (n)
on
> this node, and goind to another target node also having (m) connection
> endpoints. The visual for this connection could be a kind of fork like
this:
>
> \ /
> _\_________________________/_
> / \
> / \
>
> 2) a connection from n distinct nodes to m disctinct nodes
> 3) a mix of 1) and 2)
>
> Is this possible with current GEF API?
> If YES, what should I return from getModelSourceConnections() /
> getModelTargetConnections() in either case when these methods are called
on
> my nodes?
>
> LAST QUESTION: is it possible to make a self-connection with (1) case ?
>
> Best regards,
>
> Alex.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 1.04023 seconds