事件侦听器 meaning in English
event listener
Examples
- We have used swt widgets : button , sashform , table , tablecolumn , and implemented an event listener
我们已经使用的swt窗口构件有: button 、 sashform 、 table和tablecolumn ,而且实现了一个事件侦听器。 - The swing framework makes extensive use of the observer pattern also known as the publish - subscribe pattern in the form of event listeners
) swing框架以事件侦听器的形式广泛利用了观察者模式(也称为发布-订阅模式) 。 - One risk of this approach emerges when the event listener is subclassed : now , anything done by the subclass constructor happens after the
在继承事件侦听器的时候,会出现这种方法的一个风险:这时,子类构造函数做的任何工作都是在 - The java programming language provides support for defining event listeners based on the observer design pattern , but this isn t sufficient when you need to use objects written in other languages
Java编程语言为定义基于观察者设计模式( observer design pattern )的事件侦听器提供了支持,但当您需要使用以其他语言编写的对象时,这还不够。 - Worse , they must be public parts of the listener s interface ; either you expose this as part of your public interface or you make an inner class that does nothing but wrap up your event listener code
更糟的是,函数必须是侦听器接口的公共部分;要么把这作为公共接口的一部分公开,要么创建一个什么都不做、只是包装事件侦听器代码的内部类。