Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » anyone use SnapToGrid?
anyone use SnapToGrid? [message #234593] Thu, 24 May 2007 14:59 Go to next message
Eclipse UserFriend
Originally posted by: bservice.comcast.net.nospam

I have a Graphical editor part that uses a GridLayer. On this GridLayer are
various draw2d rectangles. The user can drag these rectangles around on the
GridLayer.
I would like to use the SnapToGrid class to properly snap the rectangle onto
the grid squares when the user is done dragging. Any good example code out
there for implementing this behavior?
Re: anyone use SnapToGrid? [message #234607 is a reply to message #234593] Thu, 24 May 2007 20:57 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Brian,

The GEF Logic Example demonstrates snap to grid support. Check out the View
main menu to turn on the Grid and Snap to Geometry.

Cheers...
Anthony

"Brian Service" <bservice@comcast.net>@nospam> wrote in message
news:f3498i$4eo$1@build.eclipse.org...
>I have a Graphical editor part that uses a GridLayer. On this GridLayer
>are various draw2d rectangles. The user can drag these rectangles around
>on the GridLayer.
> I would like to use the SnapToGrid class to properly snap the rectangle
> onto the grid squares when the user is done dragging. Any good example
> code out there for implementing this behavior?
>
>
Re: anyone use SnapToGrid? [message #234620 is a reply to message #234607] Fri, 25 May 2007 12:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bservice.comcast.net.nospam

Anthony,

I must have an older version of the GEF logic example. There is no
snapToGrid functionality in the GEF logic example I had downloaded. I
noticed the source files have 2002 dates on them. Could you tell me where I
might get an updated version of the logic example?

Thanks, Brian


"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:f34u84$jp6$1@build.eclipse.org...
> Hi Brian,
>
> The GEF Logic Example demonstrates snap to grid support. Check out the
> View main menu to turn on the Grid and Snap to Geometry.
>
> Cheers...
> Anthony
>
> "Brian Service" <bservice@comcast.net>@nospam> wrote in message
> news:f3498i$4eo$1@build.eclipse.org...
>>I have a Graphical editor part that uses a GridLayer. On this GridLayer
>>are various draw2d rectangles. The user can drag these rectangles around
>>on the GridLayer.
>> I would like to use the SnapToGrid class to properly snap the rectangle
>> onto the grid squares when the user is done dragging. Any good example
>> code out there for implementing this behavior?
>>
>>
>
>
Re: anyone use SnapToGrid? [message #234627 is a reply to message #234620] Fri, 25 May 2007 14:22 Go to previous message
Eclipse UserFriend
Originally posted by: bservice.comcast.net.nospam

Nevermind. I downloaded the latest GEF 3.3RC1 and I can see the SnapToGrid
examples in the latest Logic example. Thanks again.


"Brian Service" <bservice@comcast.net>@nospam> wrote in message
news:f36lap$vjn$1@build.eclipse.org...
> Anthony,
>
> I must have an older version of the GEF logic example. There is no
> snapToGrid functionality in the GEF logic example I had downloaded. I
> noticed the source files have 2002 dates on them. Could you tell me where
> I might get an updated version of the logic example?
>
> Thanks, Brian
>
>
> "Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
> news:f34u84$jp6$1@build.eclipse.org...
>> Hi Brian,
>>
>> The GEF Logic Example demonstrates snap to grid support. Check out the
>> View main menu to turn on the Grid and Snap to Geometry.
>>
>> Cheers...
>> Anthony
>>
>> "Brian Service" <bservice@comcast.net>@nospam> wrote in message
>> news:f3498i$4eo$1@build.eclipse.org...
>>>I have a Graphical editor part that uses a GridLayer. On this GridLayer
>>>are various draw2d rectangles. The user can drag these rectangles around
>>>on the GridLayer.
>>> I would like to use the SnapToGrid class to properly snap the rectangle
>>> onto the grid squares when the user is done dragging. Any good example
>>> code out there for implementing this behavior?
>>>
>>>
>>
>>
>
>
Previous Topic:graphical artefact while zoom-ing Shapes-Editor
Next Topic:GEF ComboBox inside Properties Window
Goto Forum:
  


Current Time: Sat Aug 13 00:38:59 GMT 2022

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

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

Back to the top