Home » Eclipse Projects » GEF » Problems with displaying connections
Problems with displaying connections [message #78490] |
Thu, 08 May 2003 06:35  |
Eclipse User |
|
|
|
Originally posted by: j.verschoor.nefli.nl
Hello again.
I've created a 3 editparts: A, B, C
A extends B, and B has multiple C's
When I create a connection from C to A (or B, because it extends A) I see a
connection drawn.
When I finish the command, I get a connection from (0,0)-(100,100).
If I then drag the sourceanchor of that connection the connections
targetanchor will be placed on the right position while dragging.
If I then drag the targetanchor of that connection the connections
sourceanchor will be placed on the right position while dragging.
If you look at the picture that is created then, it looks fine. But if I now
move A or B, the connection stays on it's position.
It seems to me that the connections aren't realy connected in the view, but
are connected ni the model (because if I drag an anchor it shows up right)
I must be doing something wrong.. :)
thank you all
|
|
|
Re: Problems with displaying connections [message #78548 is a reply to message #78490] |
Thu, 08 May 2003 07:43   |
Eclipse User |
|
|
|
Originally posted by: andreas.rummler.tu-ilmenau.de
Joris Verschoor schrieb:
> When I create a connection from C to A (or B, because it extends A) I see a
> connection drawn.
> When I finish the command, I get a connection from (0,0)-(100,100).
> If I then drag the sourceanchor of that connection the connections
> targetanchor will be placed on the right position while dragging.
> If I then drag the targetanchor of that connection the connections
> sourceanchor will be placed on the right position while dragging.
> If you look at the picture that is created then, it looks fine. But if I now
> move A or B, the connection stays on it's position.
>
> It seems to me that the connections aren't realy connected in the view, but
> are connected ni the model (because if I drag an anchor it shows up right)
>
> I must be doing something wrong.. :)
It seems to me that your editparts do not implement the NodeEditPart
interface. For that reason the connection is never bound to its
appropriate anchors and it uses the default coordinates (0,0)-(100,100).
Andreas Rummler
--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
+ Andreas Rummler +
+ Technical University of Ilmenau, Germany (__) +
+ Department Of Electronic Circuits & Systems (oo) +
+ \/-------\ +
+ MAIL: mailto:arummler@acm.org || | \ +
+ MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
+ WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
+ PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots. So far, the universe is winning."
Richard Cook
|
|
|
Re: Problems with displaying connections [message #78579 is a reply to message #78548] |
Thu, 08 May 2003 07:50   |
Eclipse User |
|
|
|
Originally posted by: j.verschoor.nefli.nl
I implement NodeEditPart
Class A extends AbstractGraphicalEditPart implements
PropertyChangeListener, NodeEditPart
Class B extends A
Class C extends AbstractGraphicalEditPart implements PropertyChangeListener,
NodeEditPart
I've figured out that if I:
connect C to A, then connect the target again to C, and then connect the
source anchor to nothing, the target anchor is connected to the editpart
Maybe this info is ok.
"Andreas Rummler" <andreas.rummler@tu-ilmenau.de> wrote in message
news:b9dfpf$npj$1@rogue.oti.com...
> Joris Verschoor schrieb:
>
> > When I create a connection from C to A (or B, because it extends A) I
see a
> > connection drawn.
> > When I finish the command, I get a connection from (0,0)-(100,100).
> > If I then drag the sourceanchor of that connection the connections
> > targetanchor will be placed on the right position while dragging.
> > If I then drag the targetanchor of that connection the connections
> > sourceanchor will be placed on the right position while dragging.
> > If you look at the picture that is created then, it looks fine. But if I
now
> > move A or B, the connection stays on it's position.
> >
> > It seems to me that the connections aren't realy connected in the view,
but
> > are connected ni the model (because if I drag an anchor it shows up
right)
> >
> > I must be doing something wrong.. :)
>
> It seems to me that your editparts do not implement the NodeEditPart
> interface. For that reason the connection is never bound to its
> appropriate anchors and it uses the default coordinates (0,0)-(100,100).
>
>
> Andreas Rummler
>
>
> --
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
> + Andreas Rummler +
> + Technical University of Ilmenau, Germany (__) +
> + Department Of Electronic Circuits & Systems (oo) +
> + \/-------\ +
> + MAIL: mailto:arummler@acm.org || | \ +
> + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
> + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
> + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
>
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs and the universe trying
> to produce bigger and better idiots. So far, the universe is winning."
> Richard Cook
>
|
|
|
Re: Problems with displaying connections [message #78593 is a reply to message #78548] |
Thu, 08 May 2003 08:03  |
Eclipse User |
|
|
|
Originally posted by: j.verschoor.nefli.nl
I have found my problem..
I returned a list of children in both getModelTargetConnections and
getModelSourceConnections instead of one of them
sorry for posting this!
"Andreas Rummler" <andreas.rummler@tu-ilmenau.de> wrote in message
news:b9dfpf$npj$1@rogue.oti.com...
> Joris Verschoor schrieb:
>
> > When I create a connection from C to A (or B, because it extends A) I
see a
> > connection drawn.
> > When I finish the command, I get a connection from (0,0)-(100,100).
> > If I then drag the sourceanchor of that connection the connections
> > targetanchor will be placed on the right position while dragging.
> > If I then drag the targetanchor of that connection the connections
> > sourceanchor will be placed on the right position while dragging.
> > If you look at the picture that is created then, it looks fine. But if I
now
> > move A or B, the connection stays on it's position.
> >
> > It seems to me that the connections aren't realy connected in the view,
but
> > are connected ni the model (because if I drag an anchor it shows up
right)
> >
> > I must be doing something wrong.. :)
>
> It seems to me that your editparts do not implement the NodeEditPart
> interface. For that reason the connection is never bound to its
> appropriate anchors and it uses the default coordinates (0,0)-(100,100).
>
>
> Andreas Rummler
>
>
> --
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
> + Andreas Rummler +
> + Technical University of Ilmenau, Germany (__) +
> + Department Of Electronic Circuits & Systems (oo) +
> + \/-------\ +
> + MAIL: mailto:arummler@acm.org || | \ +
> + MAIL: mailto:andreas.rummler@tu-ilmenau.de ||----|| * +
> + WEB : http://www.inf-technik.tu-ilmenau.de/~rummler ~~ ~~ +
> + PGP : http://www.inf-technik.tu-ilmenau.de/~rummler/public.pgp +
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++
>
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs and the universe trying
> to produce bigger and better idiots. So far, the universe is winning."
> Richard Cook
>
|
|
|
Goto Forum:
Current Time: Sun Jun 01 05:06:14 EDT 2025
Powered by FUDForum. Page generated in 0.06176 seconds
|