Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Move edit Part, replace period key
Move edit Part, replace period key [message #940209] Thu, 11 October 2012 08:18 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 458
Registered: June 2011
Senior Member
Hi,

i am working with GEF and i have a digram where i can move editparts with period key + arrow keys. i want to replace period key with some other key. Any idea how to do it?

Cheers,
Re: Move edit Part, replace period key [message #946411 is a reply to message #940209] Tue, 16 October 2012 03:21 Go to previous message
Jan Krakora is currently offline Jan Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

this is realized in the SelectionTool.acceptTraverseHandle(KeyEvent e) method and as you can see it's a private method. So you can't change it.

However you could create your own SelectionTool by extending the original SelectionTool and override its handleKeyDown(KeyEvent e) method. There you should handle the key you want.

Or you could register your own KeyHandler which would accept the key you want and the action would call '.' key event on the viewer.

But these are just my ideas:)
Previous Topic:SnapToGrid on connection bendpoints
Next Topic:Using InternalImages
Goto Forum:
  


Current Time: Fri Apr 18 01:38:11 EDT 2014

Powered by FUDForum. Page generated in 0.02135 seconds