public interface DocumentEvent
DocumentEvent接口提供了一种机制,用户可以通过该机制创建实现支持的类型的事件。
据预计,该DocumentEvent接口将它实现了同一对象上实现Document接口在支持Event模型的实现。
另见Document Object Model (DOM) Level 2 Events Specification 。
| Modifier and Type | Method and Description |
|---|---|
Event |
createEvent(String eventType) |
Event createEvent(String eventType) throws DOMException
eventType -该eventType参数指定的类型Event要创建界面。
如果指定的Event接口由实现支持,则此方法将返回所Event的接口类型的新的Event。
如果Event是通过对被派遣dispatchEvent方法适当事件的init方法必须创建后,以初始化被称为Event的价值观。
作为一个例子,希望综合某种类型的用户UIEvent会打电话createEvent与参数“UIEvents”。
该initUIEvent则方法可以被称为新创建UIEvent来设置特定类型的UIEvent的要被分派,并设置其上下文information.The createEvent方法在创建用于Event ■当它要么是不方便的或不必要的,为用户创建Event自己。
在提供Event的实现不足的情况下,用户可以提供自己的Event实现以用于dispatchEvent方法。
Event
DOMException - NOT_SUPPORTED_ERR:如果实现不支持
Event的类型
Event则引发
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.