blob: 5af9a1d6affec05a2cc5180a57be3b030bce145c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:59 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Interface EventTarget
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EventTarget.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/w3c/dom/events/EventListener.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/w3c/dom/events/MouseEvent.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="EventTarget.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.w3c.dom.events</FONT>
<BR>
Interface EventTarget</H2>
<HR>
<DL>
<DT>public interface <B>EventTarget</B></DL>
<P>
The <code>EventTarget</code> interface is implemented by all
<code>Nodes</code> in an implementation which supports the DOM Event
Model. Therefore, this interface can be obtained by using
binding-specific casting methods on an instance of the <code>Node</code>
interface. The interface allows registration and removal of
<code>EventListeners</code> on an <code>EventTarget</code> and dispatch
of events to that <code>EventTarget</code>.
<p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>Document Object Model (DOM) Level 2 Events Specification</a>.
<P>
<DL>
<DT><B>Since: </B><DD>DOM Level 2</DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/w3c/dom/events/EventTarget.html#addEventListener(java.lang.String, org.w3c.dom.events.EventListener, boolean)">addEventListener</A></B>(java.lang.String&nbsp;type,
<A HREF="../../../../org/w3c/dom/events/EventListener.html">EventListener</A>&nbsp;listener,
boolean&nbsp;useCapture)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method allows the registration of event listeners on the event
target.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/w3c/dom/events/EventTarget.html#dispatchEvent(org.w3c.dom.events.Event)">dispatchEvent</A></B>(<A HREF="../../../../org/w3c/dom/events/Event.html">Event</A>&nbsp;evt)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method allows the dispatch of events into the implementations
event model.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/w3c/dom/events/EventTarget.html#removeEventListener(java.lang.String, org.w3c.dom.events.EventListener, boolean)">removeEventListener</A></B>(java.lang.String&nbsp;type,
<A HREF="../../../../org/w3c/dom/events/EventListener.html">EventListener</A>&nbsp;listener,
boolean&nbsp;useCapture)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method allows the removal of event listeners from the event
target.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="addEventListener(java.lang.String, org.w3c.dom.events.EventListener, boolean)"><!-- --></A><H3>
addEventListener</H3>
<PRE>
public void <B>addEventListener</B>(java.lang.String&nbsp;type,
<A HREF="../../../../org/w3c/dom/events/EventListener.html">EventListener</A>&nbsp;listener,
boolean&nbsp;useCapture)</PRE>
<DL>
<DD>This method allows the registration of event listeners on the event
target. If an <code>EventListener</code> is added to an
<code>EventTarget</code> while it is processing an event, it will not
be triggered by the current actions but may be triggered during a
later stage of event flow, such as the bubbling phase.
<br> If multiple identical <code>EventListener</code>s are registered
on the same <code>EventTarget</code> with the same parameters the
duplicate instances are discarded. They do not cause the
<code>EventListener</code> to be called twice and since they are
discarded they do not need to be removed with the
<code>removeEventListener</code> method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - The event type for which the user is registering<DD><CODE>listener</CODE> - The <code>listener</code> parameter takes an interface
implemented by the user which contains the methods to be called
when the event occurs.<DD><CODE>useCapture</CODE> - If true, <code>useCapture</code> indicates that the
user wishes to initiate capture. After initiating capture, all
events of the specified type will be dispatched to the registered
<code>EventListener</code> before being dispatched to any
<code>EventTargets</code> beneath them in the tree. Events which
are bubbling upward through the tree will not trigger an
<code>EventListener</code> designated to use capture.</DL>
</DD>
</DL>
<HR>
<A NAME="removeEventListener(java.lang.String, org.w3c.dom.events.EventListener, boolean)"><!-- --></A><H3>
removeEventListener</H3>
<PRE>
public void <B>removeEventListener</B>(java.lang.String&nbsp;type,
<A HREF="../../../../org/w3c/dom/events/EventListener.html">EventListener</A>&nbsp;listener,
boolean&nbsp;useCapture)</PRE>
<DL>
<DD>This method allows the removal of event listeners from the event
target. If an <code>EventListener</code> is removed from an
<code>EventTarget</code> while it is processing an event, it will not
be triggered by the current actions. <code>EventListener</code>s can
never be invoked after being removed.
<br>Calling <code>removeEventListener</code> with arguments which do
not identify any currently registered <code>EventListener</code> on
the <code>EventTarget</code> has no effect.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - Specifies the event type of the <code>EventListener</code>
being removed.<DD><CODE>listener</CODE> - The <code>EventListener</code> parameter indicates the
<code>EventListener </code> to be removed.<DD><CODE>useCapture</CODE> - Specifies whether the <code>EventListener</code>
being removed was registered as a capturing listener or not. If a
listener was registered twice, one with capture and one without,
each must be removed separately. Removal of a capturing listener
does not affect a non-capturing version of the same listener, and
vice versa.</DL>
</DD>
</DL>
<HR>
<A NAME="dispatchEvent(org.w3c.dom.events.Event)"><!-- --></A><H3>
dispatchEvent</H3>
<PRE>
public boolean <B>dispatchEvent</B>(<A HREF="../../../../org/w3c/dom/events/Event.html">Event</A>&nbsp;evt)
throws <A HREF="../../../../org/w3c/dom/events/EventException.html">EventException</A></PRE>
<DL>
<DD>This method allows the dispatch of events into the implementations
event model. Events dispatched in this manner will have the same
capturing and bubbling behavior as events dispatched directly by the
implementation. The target of the event is the
<code> EventTarget</code> on which <code>dispatchEvent</code> is
called.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>evt</CODE> - Specifies the event type, behavior, and contextual
information to be used in processing the event.<DT><B>Returns:</B><DD>The return value of <code>dispatchEvent</code> indicates
whether any of the listeners which handled the event called
<code>preventDefault</code>. If <code>preventDefault</code> was
called the value is false, else the value is true.<DT><B>Throws:</B><DD><A HREF="../../../../org/w3c/dom/events/EventException.html">EventException</A> - UNSPECIFIED_EVENT_TYPE_ERR: Raised if the <code>Event</code>'s type
was not specified by initializing the event before
<code>dispatchEvent</code> was called. Specification of the
<code>Event</code>'s type as <code>null</code> or an empty string
will also trigger this exception.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EventTarget.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/w3c/dom/events/EventListener.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/w3c/dom/events/MouseEvent.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="EventTarget.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>