Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Connection Anchors
Connection Anchors [message #164264] Tue, 18 January 2005 10:43
Fabian Wolf is currently offline Fabian WolfFriend
Messages: 96
Registered: July 2009
Member
Hi,

in my GEF-Editor I want the objects to have an "infinite" number of anchor
points along some drawn line on the figure.

To get this done, I wrote an anchor class that extends
AbstractConnectionAnchor.
It's : public getLocation(Point referencePoint) : method checks if the
referencePoint is inside the owner figure returned by getOwner();

It then asks the owner figure to give back an anchor point.


My figures look like this (figure 1 and figure 2):

----- -----
I f1 I I f2 I
----- -----
I I
I----------Connection--------->I
I I
I----------Connection--------->I
I I

I'm now failing to fully understand how these anchor coordinates are
determined. What exactly happens, when I draw a connection from a source to
a target figure. How is the target coordinate determined?

I want to be able to draw a connection from f1 (all along the long straight
line) to f2 (also all along the straight line). How could I get it to not
move the anchor coordinates when moving the figures. When moving the
figures, I don't want the connection to travel up and down the line.

All this is done, using the com.realpersist.gef.schemaeditor as a base.

A basic introduction what exactly happens when drawing connections or an
"anchor introduction" is very welcome :)

Thanks a lot!!

Fabian
Previous Topic:Label aligned along a connection
Next Topic:I need to execute some code when workbench exists
Goto Forum:
  


Current Time: Thu Apr 25 11:01:18 GMT 2024

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

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

Back to the top