public interface DocumentEvent
DocumentEvent接口提供了一种机制,通过它用户可以创建类型实现所支持的事件。预计
DocumentEvent接口将它实现
Document接口在实现其支持的事件模型实现相同的对象。
| Modifier and Type | Method and Description |
|---|---|
Event |
createEvent(String eventType) |
Event createEvent(String eventType) throws DOMException
eventType -
eventType参数指定要创建
Event接口的类型。如果指定的
Event接口支持实施这个方法将返回一个新的
Event接口类型的要求。如果
Event是被派遣
dispatchEvent方法通过适当的事件init方法必须调用创建以后为了初始化的值
Event。作为一个例子,一个用户希望合成某种
UIEvent会叫
createEvent用参数“uievents”。的
initUIEvent方法可以称为新创建的
UIEvent设置UIEvent发运并设置其背景信息的具体类型,
createEvent方法用于创建
Events当它为用户创造一个
Event自己是不便或不必要的。在实施提供
Event不足的情况下,用户可能会提供他们自己的
Event实现使用
dispatchEvent方法。
Event
DOMException - not_supported_err:提出如果实现不支持
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.