Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » getSourceConnectionAnchor
getSourceConnectionAnchor [message #230951] Fri, 23 February 2007 19:16 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
anchor
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.
>
Previous Topic:Artifacts under cursor
Next Topic:Getting startet with GEF
Goto Forum:
  


Current Time: Thu Mar 28 15:43:38 GMT 2024

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

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

Back to the top