Package org.zkoss.zk.ui.impl
Class EventProcessor
- java.lang.Object
-
- org.zkoss.zk.ui.impl.EventProcessor
-
public class EventProcessor extends java.lang.Object
A utility class that simplify the implementation ofEventProcessingThread
.- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description EventProcessor(Desktop desktop, Component comp, Event event)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Cleanup this process after processing the event by callingprocess()
.Component
getComponent()
Returns the component.Desktop
getDesktop()
Returns the desktop.Event
getEvent()
Returns the event.static boolean
inEventListener()
Returns whether the current thread is an event listener.void
process()
Process the event.void
setup()
Setup this processor before processing the event by callingprocess()
.java.lang.String
toString()
-
-
-
Method Detail
-
inEventListener
public static final boolean inEventListener()
Returns whether the current thread is an event listener.
-
getDesktop
public final Desktop getDesktop()
Returns the desktop.
-
getEvent
public final Event getEvent()
Returns the event.
-
getComponent
public final Component getComponent()
Returns the component.
-
process
public void process() throws java.lang.Exception
Process the event. Note: it doesn't invoke EventThreadInit and EventThreadCleanup.This method is to implement
EventProcessingThread
. See alsoConfiguration.isEventThreadEnabled()
.- Throws:
java.lang.Exception
-
setup
public void setup()
Setup this processor before processing the event by callingprocess()
.Note: it doesn't invoke
ExecutionCtrl.onActivate()
-
cleanup
public void cleanup()
Cleanup this process after processing the event by callingprocess()
.Note: Don't call this method if the event process executes in the same thread.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-