Class EventProcessor

java.lang.Object
org.zkoss.zk.ui.impl.EventProcessor

public class EventProcessor extends Object
A utility class that simplify the implementation of EventProcessingThread.
Author:
tomyeh
  • Constructor Details

    • EventProcessor

      public EventProcessor(Desktop desktop, Component comp, Event event)
      Parameters:
      comp - the component. Its desktop must be either null or the same as desktop.
  • Method Details

    • 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 Exception
      Process the event. Note: it doesn't invoke EventThreadInit and EventThreadCleanup.

      This method is to implement EventProcessingThread. See also Configuration.isEventThreadEnabled().

      Throws:
      Exception
    • setup

      public void setup()
      Setup this processor before processing the event by calling process().

      Note: it doesn't invoke ExecutionCtrl.onActivate()

    • cleanup

      public void cleanup()
      Cleanup this process after processing the event by calling process().

      Note: Don't call this method if the event process executes in the same thread.

    • toString

      public String toString()
      Overrides:
      toString in class Object