Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Snap to Grid and arrow keys
Snap to Grid and arrow keys [message #143822] Wed, 21 July 2004 19:59 Go to next message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
When snap to grid is enabled and the user uses the keyboard (i.e. '.' then
left/right/up/down arrow), is there a way to get one keystroke equal to one
grid spacing?

thanks,

Jody
Re: Snap to Grid and arrow keys [message #143827 is a reply to message #143822] Wed, 21 July 2004 21:08 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Look at DragEditPartsTracker#handleKeyDown(KeyEvent). If an arrow key is
pressed (acceptArrowKey(e)), it determines the amount by which to move the
part by invoking accGetStep(). You'd have to override this default
behaviour IFF the grid is enabled. Since accGetStep is package protected,
just override handleKeyDown and move the mouse by horizontal or vertical
grid spacing. You'll have to do the same for ResizeTracker if you want the
same effect during resizing.


"Jody Schofield" <jodyschofield@rogers.com> wrote in message
news:cdmhs7$rgo$1@eclipse.org...
> When snap to grid is enabled and the user uses the keyboard (i.e. '.' then
> left/right/up/down arrow), is there a way to get one keystroke equal to
one
> grid spacing?
>
> thanks,
>
> Jody
>
>
Re: Snap to Grid and arrow keys [message #144009 is a reply to message #143827] Thu, 22 July 2004 18:13 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

But also open a bugzilla feature request too.

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:cdmltb$34l$1@eclipse.org...
> Look at DragEditPartsTracker#handleKeyDown(KeyEvent). If an arrow key is
> pressed (acceptArrowKey(e)), it determines the amount by which to move the
> part by invoking accGetStep(). You'd have to override this default
> behaviour IFF the grid is enabled. Since accGetStep is package protected,
> just override handleKeyDown and move the mouse by horizontal or vertical
> grid spacing. You'll have to do the same for ResizeTracker if you want
the
> same effect during resizing.
>
>
> "Jody Schofield" <jodyschofield@rogers.com> wrote in message
> news:cdmhs7$rgo$1@eclipse.org...
> > When snap to grid is enabled and the user uses the keyboard (i.e. '.'
then
> > left/right/up/down arrow), is there a way to get one keystroke equal to
> one
> > grid spacing?
> >
> > thanks,
> >
> > Jody
> >
> >
>
>
Previous Topic:Best way to serialize a diagram
Next Topic:About "org.eclipse.gef.ui.stackview.CommandStackInspectorPage"
Goto Forum:
  


Current Time: Thu Mar 28 18:06:25 GMT 2024

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

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

Back to the top