public interface EventInterceptor
To register an event interceptor to a desktop, invoke
Desktop.addListener(java.lang.Object)
.
To register an event intercepter to a configuration, invoke
Configuration.addListener(java.lang.Class<?>)
.
Modifier and Type | Method and Description |
---|---|
void |
afterProcessEvent(Event event)
Called after processing an event.
|
Event |
beforePostEvent(Event event)
Called before posting an event
(with
Events.postEvent(org.zkoss.zk.ui.event.Event) ). |
Event |
beforeProcessEvent(Event event)
Called before processing an event.
|
Event |
beforeSendEvent(Event event)
Called before sending an event
(with
Events.sendEvent(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event) ). |
Event beforeSendEvent(Event event)
Events.sendEvent(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event)
).
If this method throws an exception, it will abort the execution
and shows an error message to the end user (unless it is cleaned
up by EventThreadCleanup
).
event
- the event being sentEvent beforePostEvent(Event event)
Events.postEvent(org.zkoss.zk.ui.event.Event)
).
If this method throws an exception, it will abort the execution
and shows an error message to the end user (unless it is cleaned
up by EventThreadCleanup
).
event
- the event being postedEvent beforeProcessEvent(Event event)
Note: it executes in the event processing thread, so you can update the desktop whatever you need. For example, you might create a highlighted window and return null to prevent the user from accessing, if the system is too busy.
If this method throws an exception, it will abort the execution
and shows an error message to the end user (unless it is cleaned
up by EventThreadCleanup
).
event
- the event being processedvoid afterProcessEvent(Event event)
If this method throws an exception, it will abort the execution
and shows an error message to the end user (unless it is cleaned
up by EventThreadCleanup
).
event
- the event being processedCopyright © 2005-2011 Potix Corporation. All Rights Reserved.