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
方法用于创建
Event
s当它为用户创造一个
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.