Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ConnectionAnchor for Triangle-Figure
ConnectionAnchor for Triangle-Figure [message #209586] Thu, 16 February 2006 15:19 Go to next message
Martin Rosenthal is currently offline Martin RosenthalFriend
Messages: 18
Registered: July 2009
Junior Member
Hello there,

i need a connectionanchor for a triangle-figure in my gef editor. when i
use chopboxanchor, the connection ends at a rectangle around my triangle...

i know, that i need a custom connectionanchor, but i dont know, how to do
this...

i hope you know what i mean..

regards Martin
Re: ConnectionAnchor for Triangle-Figure [message #209648 is a reply to message #209586] Fri, 17 February 2006 16:15 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
You should subclass from AbstractConnectionAnchor and override the
getLocation(Point reference). Use the reference point to intersect with the
triangle polygon to return a point on the triangle.

Take a look at the geometry class (org.eclipse.draw2d.geometry) for how to
do an intersection calculation. GMF also has some geometry extensions that
might be of interest. (org.eclipse.gmf.runtime.draw2d.ui.geometry).

Regards,

Steve.

"Martin" <fiesta81@gmx.de> wrote in message
news:0c3a1db63bc5ac9dfa510d7447ad6b18$1@www.eclipse.org...
> Hello there,
>
> i need a connectionanchor for a triangle-figure in my gef editor. when i
> use chopboxanchor, the connection ends at a rectangle around my
triangle...
>
> i know, that i need a custom connectionanchor, but i dont know, how to do
> this...
>
> i hope you know what i mean..
>
> regards Martin
>
ConnectionAnchor-related issue: I cannot reconnect within the same figure [message #227304 is a reply to message #209586] Sat, 02 December 2006 02:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juancappi.yahoo.es

Hi there,

I have a figure that has 8 different possible anchor points. Currently
everything works fine if I try to reconnect with a different figure, but
if I just try to change the connection to a different anchor point
within the same figure, the resulting behavior is equivalent to have
selected an invalid target: the connection gets back to the original
anchor point.
I'm not getting any run-time error. Seems that there is a "policy" or
something similar that is not allowing me to reconnect with the same
target figure.
Does any body have had the same problem? Any idea?

Thanks!

-Juan
Re: ConnectionAnchor-related issue: I cannot reconnect within the same figure [message #227319 is a reply to message #227304] Sat, 02 December 2006 07:48 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi Juan,

Check if the command created for this reconnection request by
GraphicalNodeEditPolicy or you own derived from GraphicalNodeEditPolicy
returns an executable command. If yes, check that the command is properly
executed, model is updated and you properly refresh the editparts for the
fired event. But to me it sounds more like the command created by edit
pplicies is not executable. Even if the command created by your
GraphicalNodeEditPolicy is executable just make sure other edit policy
don't create unexecutable commands for this "reconnect" request.
Hope this helps.

Cheers,
Alex
Re: ConnectionAnchor-related issue: I cannot reconnect within the same figure [message #230958 is a reply to message #227304] Sun, 25 February 2007 17:29 Go to previous message
Eclipse UserFriend
Originally posted by: j.lunix.gmail.com

Hi. I hope that help me because its important for me. I am trying to
connecto two figures but when i click on the target figure, the line
connection desappear. I cant connecto two figures. WHY?? please help me,
its too necesary for me. Help me.
Previous Topic:GEF, EMF, and platform undo/redo/command
Next Topic:Artifacts under cursor
Goto Forum:
  


Current Time: Fri Apr 26 02:57:05 GMT 2024

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

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

Back to the top