You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2006/12/09 05:37:31 UTC
svn commit: r484911 - in /xmlgraphics/batik/trunk: build.xml
sources/org/apache/batik/dom/AbstractNode.java
sources/org/apache/batik/dom/events/NodeEventTarget.java
Author: cam
Date: Fri Dec 8 20:37:29 2006
New Revision: 484911
URL: http://svn.apache.org/viewvc?view=rev&rev=484911
Log:
1. Build file updated so javadoc assumes UTF-8 encoding for source files.
2. NodeEventTarget updated to duplicate latest DOM 3 Events methods, for
JDK < 1.5.
Modified:
xmlgraphics/batik/trunk/build.xml
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractNode.java
xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/NodeEventTarget.java
Modified: xmlgraphics/batik/trunk/build.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/build.xml?view=diff&rev=484911&r1=484910&r2=484911
==============================================================================
--- xmlgraphics/batik/trunk/build.xml (original)
+++ xmlgraphics/batik/trunk/build.xml Fri Dec 8 20:37:29 2006
@@ -1625,6 +1625,7 @@
excludepackagenames="${javadoc-exclusions}"
maxmemory="128m"
destdir="${docs}/javadoc"
+ encoding="UTF-8"
author="false"
version="false"
use="true"
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractNode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractNode.java?view=diff&rev=484911&r1=484910&r2=484911
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractNode.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/AbstractNode.java Fri Dec 8 20:37:29 2006
@@ -1012,16 +1012,17 @@
}
/**
- * <b>DOM</b>: Implements
- * {@link org.w3c.dom.events.EventTarget#willTriggerNS(String,String)}.
+ * <b>DOM</b>: Implements {@code EventTarget.willTriggerNS(String,String)}
+ * from and old draft of DOM Level 3 Events.
*/
public boolean willTriggerNS(String namespaceURI, String type) {
return true;
}
/**
- * <b>DOM</b>: Implements
- * {@link org.w3c.dom.events.EventTarget#hasEventListenerNS(String,String)}.
+ * <b>DOM</b>: Implements {@code
+ * EventTarget.hasEventListenerNS(String,String)} from and old draft of DOM
+ * Level 3 Events.
*/
public boolean hasEventListenerNS(String namespaceURI, String type) {
if (eventSupport == null) {
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/NodeEventTarget.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/NodeEventTarget.java?view=diff&rev=484911&r1=484910&r2=484911
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/NodeEventTarget.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/dom/events/NodeEventTarget.java Fri Dec 8 20:37:29 2006
@@ -18,6 +18,10 @@
*/
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;
/**
@@ -44,23 +48,48 @@
// follow.
/**
+ * 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;
+
+ /**
* This method allows the registration of an event listener in a
* specified group or the default group and, depending on the
* <code>useCapture</code> parameter, on the capture phase of the DOM
* event flow or its target and bubbling phases.
* @param namespaceURI Specifies the <code>Event.namespaceURI</code>
* associated with the event for which the user is registering.
- * @param type Specifies the <code>Event.type</code> associated with the
- * event for which the user is registering.
- * @param listener The <code>listener</code> parameter takes an object
- * implemented by the user which implements the
- * <code>EventListener</code> interface and contains the method to be
- * called when the event occurs.
- * @param useCapture If true, <code>useCapture</code> indicates that the
- * user wishes to add the event listener for the capture phase only,
- * i.e. this event listener will not be triggered during the target
- * and bubbling phases. If <code>false</code>, the event listener will
- * only be triggered during the target and bubbling phases.
+ * @param type Refer to the <code>EventTarget.addEventListener()</code>
+ * method for a description of this parameter.
+ * @param listener Refer to the
+ * <code>EventTarget.addEventListener()</code> method for a
+ * description of this parameter.
+ * @param useCapture Refer to the
+ * <code>EventTarget.addEventListener()</code> method for a
+ * description of this parameter.
* @param evtGroup The object that represents the event group to
* associate with the <code>EventListener</code> (see also ). Use
* <code>null</code> to attach the event listener to the default
@@ -68,72 +97,33 @@
* @since DOM Level 3
*/
void addEventListenerNS(String namespaceURI,
- String type,
- org.w3c.dom.events.EventListener listener,
- boolean useCapture,
- Object evtGroup);
+ String type,
+ EventListener listener,
+ boolean useCapture,
+ Object evtGroup);
/**
* This method allows the removal of an event listener, independently of
- * the associated event group.
- * <br> Calling <code>removeEventListenerNS</code> with arguments which do
- * not identify any currently registered <code>EventListener</code> on
- * the <code>EventTarget</code> has no effect.
+ * the associated event group. Calling <code>removeEventListenerNS</code>
+ * with arguments which do not identify any currently registered
+ * <code>EventListener</code> on the <code>EventTarget</code> has no
+ * effect.
* @param namespaceURI Specifies the <code>Event.namespaceURI</code>
* associated with the event for which the user registered the event
* listener.
- * @param type Specifies the <code>Event.type</code> associated with the
- * event for which the user registered the event listener.
- * @param listener The <code>EventListener</code> parameter indicates
- * the <code>EventListener</code> to be removed.
- * @param useCapture Specifies whether the <code>EventListener</code>
- * being removed was registered for the capture phase or not. If a
- * listener was registered twice, once for the capture phase and once
- * for the target and bubbling phases, each must be removed
- * separately. Removal of an event listener registered for the capture
- * phase does not affect the same event listener registered for the
- * target and bubbling phases, and vice versa.
+ * @param type Refer to the
+ * <code>EventTarget.removeEventListener()</code> method for a
+ * description of this parameter.
+ * @param listener Refer to the
+ * <code>EventTarget.removeEventListener()</code> method for a
+ * description of this parameter.
+ * @param useCapture Refer to the
+ * <code>EventTarget.removeEventListener()</code> method for a
+ * description of this parameter.
* @since DOM Level 3
*/
void removeEventListenerNS(String namespaceURI,
- String type,
- org.w3c.dom.events.EventListener listener,
- boolean useCapture);
-
- /**
- * This method allows the DOM application to know if an event listener,
- * attached to this <code>EventTarget</code> or one of its ancestors,
- * will be triggered by the specified event type during the dispatch of
- * the event to this event target or one of its descendants.
- * @param namespaceURI Specifies the <code>Event.namespaceURI</code>
- * associated with the event.
- * @param type Specifies the <code>Event.type</code> associated with the
- * event.
- * @return <code>true</code> if an event listener will be triggered on
- * the <code>EventTarget</code> with the specified event type,
- * <code>false</code> otherwise.
- * @since DOM Level 3
- */
- boolean willTriggerNS(String namespaceURI,
- String type);
-
- /**
- * This method allows the DOM application to know if this
- * <code>EventTarget</code> contains an event listener registered for
- * the specified event type. This is useful for determining at which
- * nodes within a hierarchy altered handling of specific event types has
- * been introduced, but should not be used to determine whether the
- * specified event type triggers an event listener (see
- * <code>EventTarget.willTriggerNS()</code>).
- * @param namespaceURI Specifies the <code>Event.namespaceURI</code>
- * associated with the event.
- * @param type Specifies the <code>Event.type</code> associated with the
- * event.
- * @return <code>true</code> if an event listener is registered on this
- * <code>EventTarget</code> for the specified event type,
- * <code>false</code> otherwise.
- * @since DOM Level 3
- */
- boolean hasEventListenerNS(String namespaceURI,
- String type);
+ String type,
+ EventListener listener,
+ boolean useCapture);
}