本文整理汇总了Java中org.w3c.dom.events.EventException类的典型用法代码示例。如果您正苦于以下问题:Java EventException类的具体用法?Java EventException怎么用?Java EventException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventException类属于org.w3c.dom.events包,在下文中一共展示了EventException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: dispatchEvent
import org.w3c.dom.events.EventException; //导入依赖的package包/类
/**
* <b>DOM</b>: Implements
* {@link org.w3c.dom.events.EventTarget#dispatchEvent(Event)}.
*/
public boolean dispatchEvent(Event evt) throws EventException {
if (eventSupport == null) {
initializeEventSupport();
}
return eventSupport.dispatchEvent(this, evt);
}
开发者ID:git-moss,项目名称:Push2Display,代码行数:11,代码来源:AbstractNode.java
示例2: createEventException
import org.w3c.dom.events.EventException; //导入依赖的package包/类
/**
* Creates an EventException. Overrides this method if you need to
* create your own RangeException subclass.
* @param code the exception code
* @param key the resource key
* @param args arguments to use when formatting the message
*/
protected EventException createEventException(short code,
String key,
Object[] args) {
try {
AbstractDocument doc = (AbstractDocument) node.getOwnerDocument();
return new EventException(code, doc.formatMessage(key, args));
} catch (Exception e) {
return new EventException(code, key);
}
}
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:EventSupport.java
示例3: dispatchEvent
import org.w3c.dom.events.EventException; //导入依赖的package包/类
public boolean dispatchEvent(Event evt) throws EventException {
return mEventTarget.dispatchEvent(evt);
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:4,代码来源:NodeImpl.java
示例4: dispatchEvent
import org.w3c.dom.events.EventException; //导入依赖的package包/类
public boolean dispatchEvent(Event evt) throws EventException {
// We need to use the internal APIs to modify and access the event status
EventImpl eventImpl = (EventImpl)evt;
if (!eventImpl.isInitialized()) {
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR,
"Event not initialized");
} else if ((eventImpl.getType() == null) || eventImpl.getType().equals("")) {
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR,
"Unspecified even type");
}
// Initialize event status
eventImpl.setTarget(mNodeTarget);
// TODO: At this point, to support event capturing and bubbling, we should
// establish the chain of EventTargets from the top of the tree to this
// event's target.
// TODO: CAPTURING_PHASE skipped
// Handle AT_TARGET
// Invoke handleEvent of non-capturing listeners on this EventTarget.
eventImpl.setEventPhase(Event.AT_TARGET);
eventImpl.setCurrentTarget(mNodeTarget);
if (!eventImpl.isPropogationStopped() && (mListenerEntries != null)) {
for (int i = 0; i < mListenerEntries.size(); i++) {
EventListenerEntry listenerEntry = mListenerEntries.get(i);
if (!listenerEntry.mUseCapture
&& listenerEntry.mType.equals(eventImpl.getType())) {
try {
listenerEntry.mListener.handleEvent(eventImpl);
}
catch (Exception e) {
// Any exceptions thrown inside an EventListener will
// not stop propagation of the event
Log.w(TAG, "Catched EventListener exception", e);
}
}
}
}
if (eventImpl.getBubbles()) {
// TODO: BUBBLING_PHASE skipped
}
return eventImpl.isPreventDefault();
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:49,代码来源:EventTargetImpl.java
示例5: dispatchEvent
import org.w3c.dom.events.EventException; //导入依赖的package包/类
/**
* This method allows the dispatch of events into the implementation's
* event model. The event target of the event is the
* <code>EventTarget</code> object on which <code>dispatchEvent</code>
* is called.
* @param evt The event to be dispatched.
* @return Indicates whether any of the listeners which handled the
* event called <code>Event.preventDefault()</code>. If
* <code>Event.preventDefault()</code> was called the returned value
* is <code>false</code>, else it is <code>true</code>.
* @exception EventException
* UNSPECIFIED_EVENT_TYPE_ERR: Raised if the <code>Event.type</code>
* was not specified by initializing the event before
* <code>dispatchEvent</code> was called. Specification of the
* <code>Event.type</code> as <code>null</code> or an empty string
* will also trigger this exception.
* <br> DISPATCH_REQUEST_ERR: Raised if the <code>Event</code> object is
* already being dispatched.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if the <code>Event</code> object has not
* been created using <code>DocumentEvent.createEvent()</code>.
* <br> INVALID_CHARACTER_ERR: Raised if <code>Event.type</code> is not
* an <a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/#NT-NCName'>NCName</a> as defined in [<a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/'>XML Namespaces 1.1</a>]
* .
* @version DOM Level 3
*/
boolean dispatchEvent(Event evt) throws EventException, DOMException;
开发者ID:git-moss,项目名称:Push2Display,代码行数:28,代码来源:NodeEventTarget.java
示例6: dispatchEvent
import org.w3c.dom.events.EventException; //导入依赖的package包/类
/**
* Dispatch event.
*
* @param arg0
* the arg0
* @return true, if successful
* @throws EventException
* the event exception
*/
public boolean dispatchEvent(Event arg0) throws EventException {
// TODO Auto-generated method stub
return false;
}
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:14,代码来源:XMLHttpRequest.java
注:本文中的org.w3c.dom.events.EventException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论