Class EventProcessor


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

      • 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 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.
      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object