简体   繁体   English

GWT小部件的侦听器功能

[英]Listener function for gwt widgets

For my project when a button is clicked, the click event should then wait and listen to the next two clicks on different widgets and then connect them so as to form relationship between them. 对于我的项目,单击按钮时,单击事件应等待并听取不同小部件上的下两次单击,然后将它们连接起来以形成它们之间的关系。

Right now i an trying to use FocusListener without success. 现在,我尝试使用FocusListener失败。 Any suggestion will be of great help. 任何建议都会有很大帮助。

Thank you. 谢谢。

I would think you'd just want an ClickListener for each object. 我认为您只需要每个对象的ClickListener。 Handle "enabling" the other two objects in the first object's click event, then when those two objects are clicked on, invoke the method to form the relationship. 处理“启用”第一个对象的click事件中的其他两个对象,然后在单击这两个对象时,调用方法以形成关系。 You don't want to wait in the first object's event handler. 您不想在第一个对象的事件处理程序中等待。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM