Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » fixing center of window to be 0,0 with FreeformLayer
fixing center of window to be 0,0 with FreeformLayer [message #229538] Sun, 21 January 2007 14:19
Vineet Sinha is currently offline Vineet SinhaFriend
Messages: 31
Registered: July 2009
Member
Hi,
I am using FreeformLayer as the top-level figure and am adding children
to it. However I want the 0,0 position to be the center of the window.
There are two cases that I need (and am having problems with):

1> When a 20x20 figure is added at (-10,-10) at the beginning, I want
the figure to be at the center of the editor, i.e. the center of the
editor is (0,0)

2> When a user resizes the editor, I want to be able to make sure the
new center of the view is the same as the old center of the view -
currently the old top-left remains as the new top-left.


I have only been able to get these working via hacks, and would
appreciate any tips in the right direction.


Regards,
Vineet
Previous Topic:How to meaure the string(text) width?
Next Topic:Draw2D Headless
Goto Forum:
  


Current Time: Sun Oct 17 10:01:41 GMT 2021

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

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

Back to the top