Java 类org.w3c.dom.events.EventException 实例源码

项目:Push2Display    文件:AbstractNode.java   
/**
 * <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);
}
项目:Push2Display    文件:EventSupport.java   
/**
 * 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);
    }
}
项目:Push2Display    文件:AbstractNode.java   
/**
 * <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);
}
项目:Push2Display    文件:EventSupport.java   
/**
 * 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);
    }
}
项目:feathers-sdk    文件:AbstractNode.java   
/**
 * <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);
}
项目:feathers-sdk    文件:EventSupport.java   
/**
 * 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);
    }
}
项目:PeSanKita-android    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:PeSanKita-android    文件:EventTargetImpl.java   
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();
}
项目:TextSecure    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:TextSecure    文件:EventTargetImpl.java   
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();
}
项目:qksms    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:qksms    文件:EventTargetImpl.java   
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();
}
项目:TextSecureSMP    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:TextSecureSMP    文件:EventTargetImpl.java   
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();
}
项目:Silence    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:Silence    文件:EventTargetImpl.java   
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();
}
项目:Securecom-Messaging    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:Securecom-Messaging    文件:EventTargetImpl.java   
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();
}
项目:sms_DualCard    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:sms_DualCard    文件:EventTargetImpl.java   
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();
}
项目:android-aosp-mms    文件:NodeImpl.java   
public boolean dispatchEvent(Event evt) throws EventException {
    return mEventTarget.dispatchEvent(evt);
}
项目:android-aosp-mms    文件:EventTargetImpl.java   
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();
}
项目:Push2Display    文件:NodeEventTarget.java   
/**
 *  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;
项目:Push2Display    文件:NodeEventTarget.java   
/**
 *  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;
项目:feathers-sdk    文件:NodeEventTarget.java   
/**
 *  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;
项目:LoboEvolution    文件:XMLHttpRequest.java   
/**
 * 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;
}