Java Doc for EventSupport.java in  » 6.0-JDK-Modules » j2me » com » sun » perseus » model » 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 » 6.0 JDK Modules » j2me » com.sun.perseus.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.perseus.model.EventSupport

EventSupport
class EventSupport (Code)
EventSupport assumes two functions. First, it offers a central place for listeners to register for specific event types on specific observers for a particular event propagation phase (capture or bubble). Second, it performs the event dispatching according to the DOM Level 2 Event model of capture, at target and bubbling.
version:
   $Id: EventSupport.java,v 1.9 2006/06/29 10:47:31 ln156897 Exp $


Field Summary
final public static  intBUBBLE_PHASE
    
final public static  intCAPTURE_PHASE
    
protected  HashtableallListeners
    
protected  EventListener[]freezeList
     Temporary array used to dispatch events.


Method Summary
 voidaddEventListener(ModelNode handler, String type, int phase, EventListener listener)
     Adds a event listener on the input handler for the input event type and phase.
Parameters:
  handler - the node on which the listener is hooked
Parameters:
  type - the type of events to listen to.
public  voiddispatchEvent(ModelEvent evt)
     Dispatches the input event to the listeners, performing a capture and bubble phase, as defined by the DOM Level 2 event model.
protected  voidfireBubble(ModelNode currentTarget, ModelEvent evt)
     Fires the bubble event listeners on the input target.
protected  voidfireCapture(ModelNode currentTarget, ModelEvent evt)
     Fires the capture event listeners on the input target.
protected  voidfireEventListeners(ModelNode currentTarget, ModelEvent evt, int phase)
     Fires the event listeners attached to the input current target
Parameters:
  currentTarget - the node on which the event is currently flowing
Parameters:
  evt - the event to propagate
Parameters:
  phase - defines whether the event is propagating in the captureor bubble phase.
protected  VectorgetEventListeners(ModelNode node, int phase, ModelEvent evt)
    
 EventListener[]getFreezeList(int n)
     Implementation.
 voidremoveEventListener(ModelNode handler, String type, int phase, EventListener listener)
     Removes an event listener from the input handler, for the given input event type and phase.

Field Detail
BUBBLE_PHASE
final public static int BUBBLE_PHASE(Code)
One of the values allowed for the phase parameter in the addEventListener method



CAPTURE_PHASE
final public static int CAPTURE_PHASE(Code)
One of the values allowed for the phase parameter in the addEventListener method



allListeners
protected Hashtable allListeners(Code)
Maps nodes to a map of listeners for a given event type



freezeList
protected EventListener[] freezeList(Code)
Temporary array used to dispatch events.





Method Detail
addEventListener
void addEventListener(ModelNode handler, String type, int phase, EventListener listener)(Code)
Adds a event listener on the input handler for the input event type and phase.
Parameters:
  handler - the node on which the listener is hooked
Parameters:
  type - the type of events to listen to. Should not be null
Parameters:
  phase - the phase the listener listens to. Should be oneof CAPTURE_PHASE or BUBBLE_PHASE
Parameters:
  listener - the listener to hook to the handler



dispatchEvent
public void dispatchEvent(ModelEvent evt)(Code)
Dispatches the input event to the listeners, performing a capture and bubble phase, as defined by the DOM Level 2 event model.
Parameters:
  evt - the event to dispatch



fireBubble
protected void fireBubble(ModelNode currentTarget, ModelEvent evt)(Code)
Fires the bubble event listeners on the input target. This starts by firing this node's listeners, then the parent bubble listeners and so on, up to the tree's root which has no parent.
Parameters:
  currentTarget - the node on which the event should be dispatchedunless the event propagation has been stopped.
Parameters:
  evt - the event to dispatch.



fireCapture
protected void fireCapture(ModelNode currentTarget, ModelEvent evt)(Code)
Fires the capture event listeners on the input target. This starts by firing the node's parent capture listeners. As a result of this recursive behavior, the listeners on the tree root (which has no parent) are fired first, then listeners down the tree are fired.
Parameters:
  currentTarget - the node on which the event should be dispatchedunless the event propagation has been stopped.
Parameters:
  evt - the event to dispatch.



fireEventListeners
protected void fireEventListeners(ModelNode currentTarget, ModelEvent evt, int phase)(Code)
Fires the event listeners attached to the input current target
Parameters:
  currentTarget - the node on which the event is currently flowing
Parameters:
  evt - the event to propagate
Parameters:
  phase - defines whether the event is propagating in the captureor bubble phase. One of CAPTURE_PHASE or BUBBLE_PHASE.



getEventListeners
protected Vector getEventListeners(ModelNode node, int phase, ModelEvent evt)(Code)

Parameters:
  node - the ModelNode on which listeners are seeked
Parameters:
  phase - the event propagation phase for which listeners areseeked.
Parameters:
  evt - the event a Vector of EventListener registered on the input node,for the given phase and the given event type.



getFreezeList
EventListener[] getFreezeList(int n)(Code)
Implementation.
Parameters:
  n - the minimal size needed for the returned freezeList



removeEventListener
void removeEventListener(ModelNode handler, String type, int phase, EventListener listener)(Code)
Removes an event listener from the input handler, for the given input event type and phase.
Parameters:
  handler - the node on which the listener was hooked
Parameters:
  type - the event type the listener was listening to
Parameters:
  phase - the phase the listener was listening to
Parameters:
  listener - the listener to be removed



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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