鼠标点击事件
我正在使用带有 eclipse 3.6 和 java 6 的 RCP。
用户需要单击鼠标右键,然后打开一个菜单,在其中进行选择。 这是哪个鼠标事件? 如何让菜单充满选择?
问候, 海瑟姆
I am using RCP with eclipse 3.6 and java 6.
The user needs to click with right mouse buttom then opened a menu where he makes a choice.
Which mouse event is that?
How to fill the menu with choices?.
Regards,
Haythem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看看这篇文章 关于 RCP 和 eclipse 3.6 。我链接到的部分描述了如何创建上下文菜单(对于表格),右键单击时会弹出该菜单。
Have a look at this article about RCP and eclipse 3.6. The section that I've linked to describes how to create a context menu (for a table), that will pop up when right clicking.
我需要的是如何从菜单和 menuitem 创建 mouseeventlistener
我的代码中的Sectionstop是将添加鼠标侦听器的复合材料
What I need is how to create mouseeventlistener from a menu and menuitem
Sectionstop in my code is the composite where the mouselistener will be added
由于您使用的是 RCP,因此基本问题是用户在哪里右键单击。它是在您的视图/编辑器上还是在您向某些查看者贡献的对象上?更好的是,如果您那么您应该考虑通过适当的扩展点做出贡献。 org.eclipse.ui.popupMenus 或 org.eclipse.ui.menus,其 locationURI“popup:org.eclipse.ui.popup.any”
Since you are on your RCP, the basic question is where does the user right clicks. Is it on your view/editor or on an object that you contributed to some viewers? A better If you then you should look into contributing via the proper extension points. Either org.eclipse.ui.popupMenus or org.eclipse.ui.menus with locationURI "popup:org.eclipse.ui.popup.any"