开发者

How to work with tactile devices?

I am stuck on this problem : I want to execute an action when the user clicks with the pen device on a Table row (or cell) if the device is a tactile one ( for example the DefaultFxTouchPhone1 with Sun JavaME WirelessToolkit SDK 3.0 ). I tried to use the addFocusListener method but it has bugs because even though the Form which displays the Table is not shown anymore then the FocusGain method is st开发者_JS百科ill called !

So how to capture the pen click event only when the actual Form is shown ?

Thank you very much indeed


LookAndFeel.setTactileTouchDuration(int) is probably what you need.


Ok , I added the pointerListener to the Form , and I implemented the pointerPressed method into which I test if the x and y coordinates of the pointerPressed method is between the first absoluteX and last absoluteY ( plus the height ) of the Table cell. And it works !

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜