如何使用触觉设备?

发布于 2024-11-14 13:53:39 字数 256 浏览 3 评论 0原文

我陷入了这个问题:如果设备是触觉设备(例如带有 Sun JavaME WirelessToolkit SDK 3.0 的 DefaultFxTouchPhone1 ),我想在用户用笔设备单击表行(或单元格)时执行一项操作。我尝试使用 addFocusListener 方法,但它有错误,因为即使显示表格的表单不再显示,FocusGain 方法仍然被调用!

那么如何仅在实际窗体显示时捕获笔单击事件呢?

确实非常感谢

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 still called !

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

Thank you very much indeed

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

懵少女 2024-11-21 13:53:39

LookAndFeel.setTactileTouchDuration(int) 可能就是您所需要的。

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

朕就是辣么酷 2024-11-21 13:53:39

好的,我将 pointerListener 添加到了 Form 中,并实现了 pointerPressed 方法,在该方法中测试了 pointerPressed 的 x 和 y 坐标方法位于表格单元格的第一个 absoluteX 和最后一个 absoluteY (加上高度)之间。它有效!

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 !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文