public interface EventListener
EventListener接口处理事件的主要方法。用户执行
EventListener界面和使用方法
EventTarget
AddEventListener登记他们的听众。用户还应该从它的
EventTarget消除他们的
EventListener后他们使用听者完成。
当一个Node复制使用cloneNode方法附源Node的EventListeners不连接到复制Node。如果用户希望同EventListeners被添加到新创建的副本,用户必须手动添加。
| Modifier and Type | Method and Description |
|---|---|
void |
handleEvent(Event evt)
这种方法被称为当一个事件发生的类型,
EventListener接口注册。
|
void handleEvent(Event evt)
EventListener接口注册。
evt -
Event包含有关事件的上下文信息。它也包含了
stopPropagation和
preventDefault方法是用来确定事件的流程和默认动作。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.