Java Doc for Events.java in  » Ajax » zk » org » zkoss » zk » ui » event » 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 » Ajax » zk » org.zkoss.zk.ui.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.zk.ui.event.Events

Events
public class Events (Code)
Utilities to handle events.
author:
   tomyeh


Field Summary
final public static  StringON_BLUR
     The onBlur event (used with Event ).
final public static  StringON_BOOKMARK_CHANGED
     The onBookmarkChanged event (used with BookmarkEvent ) to notify that user pressed BACK, FORWARD or specified URL directly that causes the bookmark is changed (but still in the same desktop).
final public static  StringON_CANCEL
     The onCancel event (used with KeyEvent ).
final public static  StringON_CHANGE
     The onChange event (used with InputEvent ).
final public static  StringON_CHANGING
     The onChanging event (used with InputEvent ).
final public static  StringON_CHECK
     The onCheck event (used with CheckEvent ).
final public static  StringON_CLICK
     The onClick event (used with MouseEvent ).
final public static  StringON_CLIENT_INFO
     The onClientInfo event (used with ClientInfoEvent ).
final public static  StringON_CLOSE
     The onClose event (used with Event ) used to denote the close button is pressed.
final public static  StringON_CREATE
     The onCreate event (used with CreateEvent ) to notify a compoent that it (and its children) has been created by ZK's evaluating a ZUML page.
final public static  StringON_CTRL_KEY
     The onCtrlKey event (used with KeyEvent ).
final public static  StringON_DOUBLE_CLICK
     The onDoubleClick event (used with MouseEvent ).
final public static  StringON_DROP
     The onDrop event (used with DropEvent ).
final public static  StringON_ERROR
     The onError event (used with ErrorEvent ).
final public static  StringON_FOCUS
     The onFocus event (used with Event ).
final public static  StringON_MODAL
     The onModal event (used with Event ) to notify a component shall become modal.
final public static  StringON_MOVE
     The onMove event (used with MoveEvent ).
final public static  StringON_NOTIFY
     The onNotify event (used with Event ).
final public static  StringON_OK
     The onOK event (used with KeyEvent ).
final public static  StringON_OPEN
     The onOpen event (used with OpenEvent ).
final public static  StringON_PIGGYBACK
     The onPiggyback event (used with Event ) used to notify a root component that the client has sent a request to the server.
final public static  StringON_RENDER
     The onRender event (used with org.zkoss.zk.ui.ext.client.RenderOnDemand ).
final public static  StringON_RIGHT_CLICK
     The onRightClick event (used with MouseEvent ).
final public static  StringON_SCROLL
     The onScroll event (used with ScrollEvent ).
final public static  StringON_SCROLLING
     The onScrolling event (used with ScrollEvent ).
final public static  StringON_SELECT
     The onSelect event (used with SelectEvent ).
final public static  StringON_SELECTION
     The onSelection event (used with SelectionEvent ).
final public static  StringON_SIZE
     The onSize event (used with SizeEvent ).
final public static  StringON_SORT
     The onSort event (used with Event ) to notify a request for sorting.
final public static  StringON_TIMER
     The onTimer event (used with Event ).
final public static  StringON_UPLOAD
     The onUpload event (used with UploadEvent .
final public static  StringON_USER
     The onUser event.
final public static  StringON_Z_INDEX
     The onZIndex event (used with ZIndexEvent ).


Method Summary
final public static  voidechoEvent(String name, Component target, String data)
     Echos an event. By echo we mean the event is fired after the client receives the AU responses and then echoes back. In others, the event won't be execute in the current execution. Rather, it executes after the client receives the AU responses and then echoes back the event back.

It is usually if you want to prompt the user before doing a long operartion.

final public static  booleaninEventListener()
     Returns whether the current thread is an event listener.
public static  booleanisListened(Component comp, String evtnm, boolean asap)
     Returns whether an event handler or listener is available for the specified component and event.
public static  booleanisListenerAvailable(Component comp, String evtnm, boolean asap)
     Returns whether an event handler or listener is available for the specified component and event.
final public static  booleanisValid(String name)
     Returns whether an event name is valid.
final public static  voidpostEvent(Event event)
     Posts an event.
final public static  voidpostEvent(String name, Component target, Object data)
     Posts a generic event (aka, an instance of Event ).
public static  voidsendEvent(Component comp, Event event)
     Sends the event to the specified component and process it immediately.
public static  voidsendEvent(Event event)
     Sends the event the target specified in the event.

Field Detail
ON_BLUR
final public static String ON_BLUR(Code)
The onBlur event (used with Event ). Sent when a component loses a focus.



ON_BOOKMARK_CHANGED
final public static String ON_BOOKMARK_CHANGED(Code)
The onBookmarkChanged event (used with BookmarkEvent ) to notify that user pressed BACK, FORWARD or specified URL directly that causes the bookmark is changed (but still in the same desktop).

All root components of all pages of the desktop will recieve this event.




ON_CANCEL
final public static String ON_CANCEL(Code)
The onCancel event (used with KeyEvent ).



ON_CHANGE
final public static String ON_CHANGE(Code)
The onChange event (used with InputEvent ).



ON_CHANGING
final public static String ON_CHANGING(Code)
The onChanging event (used with InputEvent ).



ON_CHECK
final public static String ON_CHECK(Code)
The onCheck event (used with CheckEvent ).



ON_CLICK
final public static String ON_CLICK(Code)
The onClick event (used with MouseEvent ).



ON_CLIENT_INFO
final public static String ON_CLIENT_INFO(Code)
The onClientInfo event (used with ClientInfoEvent ).



ON_CLOSE
final public static String ON_CLOSE(Code)
The onClose event (used with Event ) used to denote the close button is pressed.



ON_CREATE
final public static String ON_CREATE(Code)
The onCreate event (used with CreateEvent ) to notify a compoent that it (and its children) has been created by ZK's evaluating a ZUML page.



ON_CTRL_KEY
final public static String ON_CTRL_KEY(Code)
The onCtrlKey event (used with KeyEvent ).



ON_DOUBLE_CLICK
final public static String ON_DOUBLE_CLICK(Code)
The onDoubleClick event (used with MouseEvent ).



ON_DROP
final public static String ON_DROP(Code)
The onDrop event (used with DropEvent ). Sent when a component is dragged and drop to another.



ON_ERROR
final public static String ON_ERROR(Code)
The onError event (used with ErrorEvent ).



ON_FOCUS
final public static String ON_FOCUS(Code)
The onFocus event (used with Event ). Sent when a component gets a focus.



ON_MODAL
final public static String ON_MODAL(Code)
The onModal event (used with Event ) to notify a component shall become modal. Currently, only ZUL's window components support it.



ON_MOVE
final public static String ON_MOVE(Code)
The onMove event (used with MoveEvent ).



ON_NOTIFY
final public static String ON_NOTIFY(Code)
The onNotify event (used with Event ). It is not used by any component, but it is, rather, designed to let users add customized events.



ON_OK
final public static String ON_OK(Code)
The onOK event (used with KeyEvent ).



ON_OPEN
final public static String ON_OPEN(Code)
The onOpen event (used with OpenEvent ).



ON_PIGGYBACK
final public static String ON_PIGGYBACK(Code)
The onPiggyback event (used with Event ) used to notify a root component that the client has sent a request to the server. It is meaningful only if it is registered to the root component. Once registered, it is called each time the client sends a request to the server. The onPiggyback's event listener is processed after all other events are processed.

The onPiggyback event is designed to let developers piggyback the least-emergent UI updates to the client.
since:
   2.4.0




ON_RENDER
final public static String ON_RENDER(Code)
The onRender event (used with org.zkoss.zk.ui.ext.client.RenderOnDemand ).



ON_RIGHT_CLICK
final public static String ON_RIGHT_CLICK(Code)
The onRightClick event (used with MouseEvent ).



ON_SCROLL
final public static String ON_SCROLL(Code)
The onScroll event (used with ScrollEvent ).



ON_SCROLLING
final public static String ON_SCROLLING(Code)
The onScrolling event (used with ScrollEvent ).



ON_SELECT
final public static String ON_SELECT(Code)
The onSelect event (used with SelectEvent ).



ON_SELECTION
final public static String ON_SELECTION(Code)
The onSelection event (used with SelectionEvent ).



ON_SIZE
final public static String ON_SIZE(Code)
The onSize event (used with SizeEvent ).



ON_SORT
final public static String ON_SORT(Code)
The onSort event (used with Event ) to notify a request for sorting.



ON_TIMER
final public static String ON_TIMER(Code)
The onTimer event (used with Event ). Sent when a timer is up.



ON_UPLOAD
final public static String ON_UPLOAD(Code)
The onUpload event (used with UploadEvent .



ON_USER
final public static String ON_USER(Code)
The onUser event. It is a generic event that an application developer might send from the client. ZK doesn't use this event.



ON_Z_INDEX
final public static String ON_Z_INDEX(Code)
The onZIndex event (used with ZIndexEvent ).





Method Detail
echoEvent
final public static void echoEvent(String name, Component target, String data)(Code)
Echos an event. By echo we mean the event is fired after the client receives the AU responses and then echoes back. In others, the event won't be execute in the current execution. Rather, it executes after the client receives the AU responses and then echoes back the event back.

It is usually if you want to prompt the user before doing a long operartion. A typical case is to open a hightlighted window to prevent the user from clicking any button before the operation gets done.
since:
   3.0.2
See Also:   Events.sendEvent
See Also:   Events.echoEvent
Parameters:
  name - the event name, such as onSomething
Parameters:
  target - the component to receive the event (never null).
Parameters:
  data - the extra information, or null if not available.It will become Event.getData.




inEventListener
final public static boolean inEventListener()(Code)
Returns whether the current thread is an event listener.



isListened
public static boolean isListened(Component comp, String evtnm, boolean asap)(Code)
Returns whether an event handler or listener is available for the specified component and event.

A event handler is either a public method named onXxx or a ZUL attribute named onXxx, where onXxx is the event name. A event listener is EventListener being added by Component.addEventListener and Page.addEventListener .

Unlike Component.isListenerAvailable , which checks only the event listener, this method check both event handlers and listeners, i.e., the onXxx members defined in ZUML, the onXxx method defined in the implementation class, and the event listener registered.
Parameters:
  asap - whether to check only non-deferrable listener,i.e., not implementing org.zkoss.zk.ui.event.Deferrable,or org.zkoss.zk.ui.event.Deferrable.isDeferrable is false.
See Also:   org.zkoss.zk.ui.event.Deferrable
See Also:   Component.isListenerAvailable




isListenerAvailable
public static boolean isListenerAvailable(Component comp, String evtnm, boolean asap)(Code)
Returns whether an event handler or listener is available for the specified component and event. Events.isListened



isValid
final public static boolean isValid(String name)(Code)
Returns whether an event name is valid.

The event name must start with on and the third character must be upper case.




postEvent
final public static void postEvent(Event event)(Code)
Posts an event. The event is placed at the end of the event queue. It will be processed after all other events are processed.

On the other hand, the event sent by Events.sendEvent is processed immediately without posting it to the queue.

Note: if the target of an event is not attached to the page yet, the event is ignored silently.
See Also:   Events.sendEvent
See Also:   Events.echoEvent




postEvent
final public static void postEvent(String name, Component target, Object data)(Code)
Posts a generic event (aka, an instance of Event ).



sendEvent
public static void sendEvent(Component comp, Event event)(Code)
Sends the event to the specified component and process it immediately. This method can only be called when processing an event. It is OK to send event to component from another page as long as they are in the same desktop.



sendEvent
public static void sendEvent(Event event)(Code)
Sends the event the target specified in the event.

Note: Event.getTarget cannot be null.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.