Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » SnapToGrid class usage
SnapToGrid class usage [message #226162] Mon, 06 November 2006 15: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 07:09 Go to previous messageGo to next message
Andreas Schosser is currently offline Andreas SchosserFriend
Messages: 30
Registered: July 2009
Member
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 07:10 Go to previous message
Andreas Schosser is currently offline Andreas SchosserFriend
Messages: 30
Registered: July 2009
Member
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 Apr 23 14:42:52 GMT 2024

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

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

Back to the top