Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » getSourceConnectionAnchor
getSourceConnectionAnchor [message #230951] Fri, 23 February 2007 14:16 Go to next message
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 05:11 Go to previous message
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
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: Sat Aug 02 04:41:12 EDT 2014

Powered by FUDForum. Page generated in 0.02292 seconds