Skip to main content



      Home
Home » Eclipse Projects » GEF » SnapToGrid class usage
SnapToGrid class usage [message #226162] Mon, 06 November 2006 10:42 Go to next message
Eclipse UserFriend
Originally posted by: matroska.libero.it

Hi,

i need to set snapToGrid property to false. How can i do that?
I don't understand the usage of SnapToGrid class.

Thanks in advance
John Slave
Re: SnapToGrid class usage [message #226187 is a reply to message #226162] Tue, 07 November 2006 02:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi John,

the EditPartViewer interface provides a setProperty method. After
creation / configuration of your GraphicalViewer, do set the
snap-to-grid param by calling:

getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_EN ABLED,
new Boolean(true));

In the SnapToGrid class you will additionally find prameters like
PROPERTY_GRID_SPACING or PROPERTY_GRID_VISIBLE, which you may set just
the same way.

Kind regards,

Andreas

John Slave wrote:
> Hi,
>
> i need to set snapToGrid property to false. How can i do that?
> I don't understand the usage of SnapToGrid class.
>
> Thanks in advance
> John Slave
Re: SnapToGrid class usage [message #226194 is a reply to message #226162] Tue, 07 November 2006 02:10 Go to previous message
Eclipse UserFriend
Hi John,

the EditPartViewer interface provides a setProperty method. After
creation / configuration of your GraphicalViewer, do set the
snap-to-grid param by calling:

getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_EN ABLED,
new Boolean(true));

In the SnapToGrid class you will additionally find prameters like
PROPERTY_GRID_SPACING or PROPERTY_GRID_VISIBLE, which you may set just
the same way.

Kind regards,

Andreas

John Slave wrote:
> Hi,
>
> i need to set snapToGrid property to false. How can i do that?
> I don't understand the usage of SnapToGrid class.
>
> Thanks in advance
> John Slave
Previous Topic:Force repaint
Next Topic:MultiPage Editor - Problem with delete action across tabs
Goto Forum:
  


Current Time: Tue May 20 02:17:25 EDT 2025

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

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

Back to the top