Package ej.mwt.event

Class DesktopEventGenerator


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

    • Constructor Detail

      • DesktopEventGenerator

        public DesktopEventGenerator()
    • Method Detail

      • getEventType

        public int getEventType()
        Description copied from class: EventGenerator
        Gets the event type associated with the event generator
        Specified by:
        getEventType in class 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.