getSourceConnectionAnchor [message #230951] |
Fri, 23 February 2007 19:16 |
Eclipse User |
|
|
|
Originally posted by: j.lunix.gmail.com
Please, i need help because is very important for my. I need connect two
figures but i cant. I think that its because i dont use well the function
getsourceconnectionanchor and gettargetconnection anchor. When click on
the target figure, the line connection desappear. Can anyone help me??
Please, its very important for me.
|
|
|
Re: getSourceConnectionAnchor [message #231005 is a reply to message #230951] |
Mon, 26 February 2007 10:11 |
Eclipse User |
|
|
|
Originally posted by: jakub.jurkiewicz.gmail.com
Hi,
Could you give us some more details? How do you implement
getSourceConnectionAnchor and getTargetConnectionAnchor ?
In my editor in these both methods I invoke my own method, which has
code like that:
if (anchor == null) {
if (getModel() instanceof Shape) {
anchor = new ChopboxAnchor(getFigure());
} else {
throw new IllegalArgumentException("unexpected model");
}
}
return anchor;
where i a private field in my edit part.
If I remember well, I had similar problem. And the problem was that I
didn't implement AbstractGraphicalEditPart#getModelSourceConnections and
AbstractGraphicalEditPart#getModelTargetConnections.
Also you can look here: http://eclipsewiki.editme.com/GefDescription2
There is a section about creating connections.
Hope this helps :)
Jakub Jurkiewicz
JL wrote:
>
> Please, i need help because is very important for my. I need connect two
> figures but i cant. I think that its because i dont use well the
> function getsourceconnectionanchor and gettargetconnection anchor. When
> click on the target figure, the line connection desappear. Can anyone
> help me??
>
> Please, its very important for me.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03222 seconds