Package ej.mwt.event

Class DesktopEventGenerator


  • public class DesktopEventGenerator
    extends ej.microui.event.EventGenerator
    This event generator is used by the event dispatcher of the desktop in order to send additional events to the widgets.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EVENT_TYPE
      The DESKTOP event type.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int buildEvent​(int action)
      Builds an event for the given action.
      static int getAction​(int event)
      Returns the action held by the given desktop event.
      int getEventType()
      Gets the event type associated with the event generator
      void send​(int action)
      Sends a desktop event for the given action to the event handler of this event generator.
      • Methods inherited from class ej.microui.event.EventGenerator

        addToSystemPool, get, get, get, getEventHandler, getId, removeFromSystemPool, sendEvent, setEventHandler
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • DesktopEventGenerator

        public DesktopEventGenerator()
    • Method Detail

      • getEventType

        public int getEventType()
        Description copied from class: ej.microui.event.EventGenerator
        Gets the event type associated with the event generator
        Specified by:
        getEventType in class ej.microui.event.EventGenerator
        Returns:
        the event type
      • buildEvent

        public int buildEvent​(int action)
        Builds an event for the given action.
        Parameters:
        action - the event action.
        Returns:
        the event.
      • send

        public void send​(int action)
        Sends a desktop event for the given action to the event handler of this event generator.

        This method is useful when other input mechanisms wish to simulate button actions.

        Parameters:
        action - the event action.
      • getAction

        public static int getAction​(int event)
        Returns the action held by the given desktop event.
        Parameters:
        event - the desktop event.
        Returns:
        the action held by the given desktop event.