英语翻译Pattern UseObserver (see page 94):This is the most obvious pattern in the event handling.There are many listener interfaces,event types,and event sources.Each is a variation on the Observer pattern,whose objective is to decouple the event

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 15:48:14
英语翻译PatternUseObserver(seepage94):Thisisthemostobviouspatternintheeventhandling.Therearemanylistener

英语翻译Pattern UseObserver (see page 94):This is the most obvious pattern in the event handling.There are many listener interfaces,event types,and event sources.Each is a variation on the Observer pattern,whose objective is to decouple the event
英语翻译
Pattern Use
Observer (see page 94):This is the most obvious pattern in the event handling.There are many listener interfaces,event types,and event sources.Each is a variation on the Observer pattern,whose objective is to decouple the event source from the listener.The event source defines the type of event and the moment at which the event occurred.The listener provides the information about what to do when the event occurs.
Adapter (see page 142):The java.awt.event package contains many classes that end with the word Adapter,so you might expect that the Adapter pattern would be implemented there.However,the event adapters do not perform the same function as a true Adapter pattern implementation.They exist to convert event handling interfaces into classes,For example,the MouseListener interface has a corresponding MouseAdapter,which implements the interface and defines a series of empty methods.Since the event adapter classes do not actually execute functional behavior or convert between two different interfaces,they cannot be considered as true Adapters.
大哥大姐们,可以用软件翻译,但是希望你们能帮我整理成通顺的句子,别这么不通顺就贴出来了.有重赏噢

英语翻译Pattern UseObserver (see page 94):This is the most obvious pattern in the event handling.There are many listener interfaces,event types,and event sources.Each is a variation on the Observer pattern,whose objective is to decouple the event
模式使用
观察员(见94页) :这是最明显的格局中的事件处理.有许多听众接口,事件类型,与事件的来源.他们每一个变化对Observer模式,其目标是脱钩活动,从源头听众.事件源定义类型的事件和时刻,在这件事发生.听众提供的资料做什么,当事件发生时.
适配器(见页142 ) :java.awt.event套件包含许多班级为此与该字适配器,因此您可能期望适配器的格局将得到执行.然而,事件适配器不执行相同的功能,作为一个真正的适配器模式的实施.它们存在的转换事件处理接口到班,例如,mouselistener接口都有相应的mouseadapter ,实现了接口,并确定了一系列空洞的方法.自从事件适配器班,并不会真正执行功能性行为,或将其转换两种不同的界面,他们可以不被视为真正的适配器