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: awm_abu.yahoo.com

Hello,

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.

Background
========

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

Thanks.


Previous Topic:Drag in MouseMotionListener does not work
Next Topic:Layout a graph with predefined assingments of nodes to rows
Goto Forum:
  


Current Time: Fri Mar 29 14:35:56 GMT 2024

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

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

Back to the top