Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Change Absolute Positions (Can't be so difficult???)
Change Absolute Positions (Can't be so difficult???) [message #243066] Wed, 21 May 2008 15:12
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

I'm very much lost in the depths of GMF and GEF.

I try something quite simple: I want to set all positions of all
elements of my diagram programmatically to some absolute x,y values.

That is (1) positions of nodes and (2) bendpoints of connections.
How can I do that??

For the first I tried a
ChangeBoundsRequest(RequestConstants.REQ_MOVE).

One problem is, that I can only give a move delta and not an absolute
position. Second problem is that even if I calc the delta, the resulting
position slightly differs from my requested position by some pixels
(looks like random differing).

For the second I use a
SetAllBendpointRequest(RequestConstants.REQ_SET_ALL_BENDPOIN T,
pointList, ptSourceReference, ptTargetReference);

The biggest problem is that here, again, the resulting bendpoints differ
a few pixels from the requested points in the pointList. I give exakt
locations, but afterwards they seem to randomly differ a bit (even up tp
10 pixels). Hence I am not able to layout a smooth polyline with many
bendpoints.

How can I tell GMF (or even only GEF?) to use exactly my absolute values
for the bounds and bendpoints of the objects?? Please help! I'm diving
through requests, editpolicies and commands for ages now to discover
that odd behavior...

Regards,
Hauke
Previous Topic:GEF commandStack
Next Topic:two model in gef
Goto Forum:
  


Current Time: Sat Dec 21 17:12:59 GMT 2024

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

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

Back to the top