开发者

Handle key presses using draw2d and swt

Every org.eclipse.draw2d.Figure class has addKeyListener() method. But when key presses not every Figure handle it. What k开发者_StackOverflowind of figure handles key-events?

Thanks.


Hm. I don't know real answer. But as variant - add listener to Shell and handle it in some specific way.


The answer is "whichever Figure currently has focus." - otherwise every time you pressed a key, all of your figures would receive the KeyEvent and have to handle it. I'd suggest that's unlikely to be what you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜