All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.batik.dom.events.NodeEventTarget Maven / Gradle / Ivy

There is a newer version: 1.18
Show newest version
/*

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

 */
package org.apache.batik.dom.events;

import org.w3c.dom.DOMException;
import org.w3c.dom.events.Event;
import org.w3c.dom.events.EventException;
import org.w3c.dom.events.EventListener;
import org.w3c.dom.events.EventTarget;

/**
 * A Node that uses an EventSupport for its event registration and
 * dispatch.
 *
 * @author Thierry Kormann
 * @author Stephane Hillion
 * @version $Id: NodeEventTarget.java 1733416 2016-03-03 07:07:13Z gadams $
 */
public interface NodeEventTarget extends EventTarget {

    /**
     * Returns the event support instance for this node, or null if any.
     */
    EventSupport getEventSupport();

    /**
     * Returns the parent node event target.
     */
    NodeEventTarget getParentNodeEventTarget();

    // Members inherited from DOM Level 3 Events org.w3c.dom.events.EventTarget
    // follow.

    /**
     *  This method allows the dispatch of events into the implementation's
     * event model. The event target of the event is the
     * EventTarget object on which dispatchEvent
     * is called.
     * @param evt  The event to be dispatched.
     * @return  Indicates whether any of the listeners which handled the
     *   event called Event.preventDefault(). If
     *   Event.preventDefault() was called the returned value
     *   is false, else it is true.
     * @exception EventException
     *    UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event.type
     *   was not specified by initializing the event before
     *   dispatchEvent was called. Specification of the
     *   Event.type as null or an empty string
     *   will also trigger this exception.
     *   
DISPATCH_REQUEST_ERR: Raised if the Event object is * already being dispatched. * @exception DOMException * NOT_SUPPORTED_ERR: Raised if the Event object has not * been created using DocumentEvent.createEvent(). *
INVALID_CHARACTER_ERR: Raised if Event.type is not * an NCName as defined in [XML Namespaces 1.1] * . * @version DOM Level 3 */ boolean dispatchEvent(Event evt) throws EventException, DOMException; /** * This method allows the registration of an event listener in a * specified group or the default group and, depending on the * useCapture parameter, on the capture phase of the DOM * event flow or its target and bubbling phases. * @param namespaceURI Specifies the Event.namespaceURI * associated with the event for which the user is registering. * @param type Refer to the EventTarget.addEventListener() * method for a description of this parameter. * @param listener Refer to the * EventTarget.addEventListener() method for a * description of this parameter. * @param useCapture Refer to the * EventTarget.addEventListener() method for a * description of this parameter. * @param evtGroup The object that represents the event group to * associate with the EventListener (see also ). Use * null to attach the event listener to the default * group. * @since DOM Level 3 */ void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup); /** * This method allows the removal of an event listener, independently of * the associated event group. Calling removeEventListenerNS * with arguments which do not identify any currently registered * EventListener on the EventTarget has no * effect. * @param namespaceURI Specifies the Event.namespaceURI * associated with the event for which the user registered the event * listener. * @param type Refer to the * EventTarget.removeEventListener() method for a * description of this parameter. * @param listener Refer to the * EventTarget.removeEventListener() method for a * description of this parameter. * @param useCapture Refer to the * EventTarget.removeEventListener() method for a * description of this parameter. * @since DOM Level 3 */ void removeEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy