Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Help needed with SnapTo
Help needed with SnapTo [message #227177] Thu, 30 November 2006 09:40
Eclipse UserFriend
Originally posted by:


I am looking to create a grid like layout editor and I was thinking of using
the SnapTo functionality to help me
However I'm not quite sure how I go about setting the co-ordinates that the
objects can snap to.

Firstly I'm assuming the method snapRectangle() is what I have to override ?

Secondly I'm looking at that method and I'm not sure how to go about setting
the co-ordinates.

Do I have to set the gridx and gridy values ?

Sorry that this question is a bit vague but if you could point me towards an
example even it would be great.


I need a grid like the one attached.
As you can see the cells are not uniform in size
As the diagram zooms the space between the cells changes.
Therefore my grid co-ordinates change constantly.
So I need my SnapToGrid to mirror the GridLayer which I used to draw what
you see

As I say any thoughts would be great


Previous Topic:Creating a request
Next Topic:How to provide printing functionality in GEF application?
Goto Forum:

Current Time: Wed Dec 08 20:10:39 GMT 2021

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

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

Back to the top