Java Doc for EventTarget.java in  » Graphic-Library » batik » org » w3c » dom » events » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.w3c.dom.events 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.dom.events.EventTarget

EventTarget
public interface EventTarget (Code)
The EventTarget interface is implemented by all the objects which could be event targets in an implementation which supports the . The interface allows registration and removal of event listeners, and dispatch of events to an event target.

When used with , this interface is implemented by all target nodes and target ancestors, i.e. all DOM Nodes of the tree support this interface when the implementation conforms to DOM Level 3 Events and, therefore, this interface can be obtained by using binding-specific casting methods on an instance of the Node interface.

Invoking addEventListener or addEventListenerNS repeatedly on the same EventTarget with the same values for the parameters namespaceURI, type, listener, and useCapture has no effect. Doing so does not cause the EventListener to be called more than once and does not cause a change in the triggering order. In order to register a listener for a different event group () the previously registered listener has to be removed first.

See also the Document Object Model (DOM) Level 3 Events Specification .
since:
   DOM Level 2





Method Summary
public  voidaddEventListener(String type, EventListener listener, boolean useCapture)
     This method allows the registration of an event listener in the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
public  voidaddEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup)
     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.
public  booleandispatchEvent(Event evt)
     This method allows the dispatch of events into the implementation's event model.
public  voidremoveEventListener(String type, EventListener listener, boolean useCapture)
     This method allows the removal of event listeners from the default group.
public  voidremoveEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture)
     This method allows the removal of an event listener, independently of the associated event group.



Method Detail
addEventListener
public void addEventListener(String type, EventListener listener, boolean useCapture)(Code)
This method allows the registration of an event listener in the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases. Invoking this method is equivalent to invoking addEventListenerNS with the same values for the parameters type, listener, and useCapture, and the value null for the parameters namespaceURI and evtGroup.
Parameters:
  type - Specifies the Event.type associated with the event for which the user is registering.
Parameters:
  listener - The listener parameter takes an object implemented by the user which implements the EventListener interface and contains the method to be called when the event occurs.
Parameters:
  useCapture - If true, useCapture 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 false, the event listener will only be triggered during the target and bubbling phases.



addEventListenerNS
public void addEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture, Object evtGroup)(Code)
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.
Parameters:
  namespaceURI - Specifies the Event.namespaceURI associated with the event for which the user is registering.
Parameters:
  type - Refer to the EventTarget.addEventListener() method for a description of this parameter.
Parameters:
  listener - Refer to the EventTarget.addEventListener() method for a description of this parameter.
Parameters:
  useCapture - Refer to the EventTarget.addEventListener() method for a description of this parameter.
Parameters:
  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



dispatchEvent
public boolean dispatchEvent(Event evt) throws EventException, DOMException(Code)
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.
Parameters:
  evt - The event to be dispatched. 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



removeEventListener
public void removeEventListener(String type, EventListener listener, boolean useCapture)(Code)
This method allows the removal of event listeners from the default group. Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect. The Event.namespaceURI for which the user registered the event listener is implied and is null.

Note: Event listeners registered for other event groups than the default group cannot be removed using this method; see EventTarget.removeEventListenerNS() for that effect.
Parameters:
  type - Specifies the Event.type for which the user registered the event listener.
Parameters:
  listener - The EventListener to be removed.
Parameters:
  useCapture - Specifies whether the EventListener 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.




removeEventListenerNS
public void removeEventListenerNS(String namespaceURI, String type, EventListener listener, boolean useCapture)(Code)
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.
Parameters:
  namespaceURI - Specifies the Event.namespaceURI associated with the event for which the user registered the event listener.
Parameters:
  type - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
Parameters:
  listener - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
Parameters:
  useCapture - Refer to the EventTarget.removeEventListener() method for a description of this parameter.
since:
   DOM Level 3



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.