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 |
---|---|
default void |
afterProcessEvent(Event event)
Called after processing an event.
|
default Event |
beforePostEvent(Event event)
Called before posting an event
(with
Events.postEvent(org.zkoss.zk.ui.event.Event) ). |
default Event |
beforeProcessEvent(Event event)
Called before processing an event.
|
default Event |
beforeSendEvent(Event event)
Called before sending an event
(with
Events.sendEvent(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event) ). |
default 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 sentdefault Event 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 posteddefault Event 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 processeddefault void 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-2023 Potix Corporation. All Rights Reserved.