com.hp.lft.sdk.java

Class EventInfoFactory

  • java.lang.Object
    • com.hp.lft.sdk.java.EventInfoFactory


  • public class EventInfoFactory
    extends java.lang.Object
    A factory for creating EventInfo to be passed to fireEvent methods.
    • Constructor Detail

      • EventInfoFactory

        public EventInfoFactory()
    • Method Detail

      • createKeyboardEventInfo

        public static KeyboardEventInfo createKeyboardEventInfo(KeyboardEvent keyboardEvent,
                                                                long when,
                                                                int modifiers,
                                                                int keyCode,
                                                                char keyChar,
                                                                int keyLocation)
        Creates a KeyboardEventInfo object with the given parameters.
        Parameters:
        keyboardEvent - the KeyboardEvent to create the KeyboardEventInfo for.
        when - the time the event occurred.
        modifiers - a mask of values of representing the modifier keys down during event. See documentation for java.awt.event.InputEvent.
        keyCode - the key pressed.
        keyChar - the unicode character generated by this event.
        keyLocation - one of: KEY_LOCATION_UNKNOWN, KEY_LOCATION_STANDARD, KEY_LOCATION_LEFT, KEY_LOCATION_RIGHT, and KEY_LOCATION_NUMPAD. See documentation for java.awt.event.KeyEvent.
        Returns:
        a new instance of KeyboardEventInfo.
      • createKeyboardEventInfo

        public static KeyboardEventInfo createKeyboardEventInfo(KeyboardEvent keyboardEvent,
                                                                long when,
                                                                int modifiers,
                                                                int keyCode,
                                                                char keyChar)
        Creates a KeyboardEventInfo with the given parameters.
        Parameters:
        keyboardEvent - the KeyboardEvent to create the KeyboardEventInfo for.
        when - the time the event occurred.
        modifiers - a mask of values of representing the modifier keys down during event. See documentation for java.awt.event.InputEvent.
        keyCode - the key pressed.
        keyChar - the unicode character generated by this event.
        Returns:
        a new instance of KeyboardEventInfo.
      • createMouseEventInfo

        public static MouseEventInfo createMouseEventInfo(MouseEvent mouseEvent,
                                                          long when,
                                                          int modifiers,
                                                          int x,
                                                          int y,
                                                          int clickCount,
                                                          boolean popupTrigger)
        Creates a MouseEventInfo with the given parameters.
        Parameters:
        mouseEvent - the MouseEvent to create the MouseEventInfo for.
        when - the time the event occurred.
        modifiers - a mask of values of representing the modifier keys down during event. See documentation for java.awt.event.InputEvent.
        x - in pixels relative to the parent window.
        y - in pixels relative to the parent window.
        clickCount - count of mouse clicks associated with event.
        popupTrigger - true if event is a trigger for a popup menu.
        Returns:
        a new instance of MouseEventInfo .
      • createMouseEventInfo

        public static MouseEventInfo createMouseEventInfo(MouseEvent mouseEvent,
                                                          long when,
                                                          int modifiers,
                                                          int x,
                                                          int y,
                                                          int clickCount,
                                                          boolean popupTrigger,
                                                          int button)
        Creates a MouseEventInfo with the given parameters.
        Parameters:
        mouseEvent - the MouseEvent to create the MouseEventInfo for.
        when - the time the event occurred.
        modifiers - a mask of values of representing the modifier keys down during event. See documentation for java.awt.event.InputEvent.
        x - in pixels relative to the parent window.
        y - in pixels relative to the parent window.
        clickCount - count of mouse clicks associated with event.
        popupTrigger - true if event is a trigger for a popup menu.
        button - mouse button that changed state. For values, see documentation for java.awt.event.MouseEvent.
        Returns:
        a new instance of MouseEventInfo with the given parameters.
      • createMouseEventInfo

        public static MouseEventInfo createMouseEventInfo(MouseEvent mouseEvent,
                                                          long when,
                                                          int modifiers,
                                                          int x,
                                                          int y,
                                                          int xAbs,
                                                          int yAbs,
                                                          int clickCount,
                                                          boolean popupTrigger,
                                                          int button)
        Creates a MouseEventInfo with the given parameters.
        Parameters:
        mouseEvent - the MouseEvent to create the MouseEventInfo for.
        when - the time the event occurred.
        modifiers - a mask of values of representing the modifier keys down during event. See documentation for java.awt.event.InputEvent.
        x - in pixels relative to the parent window.
        y - in pixels relative to the parent window.
        xAbs - in pixels relative to screen.
        yAbs - in pixels relative to screen.
        clickCount - count of mouse clicks associated with event.
        popupTrigger - true if event is a trigger for a popup menu.
        button - mouse button that changed state. For values, see documentation for java.awt.event.MouseEvent.
        Returns:
        a new instance of MouseEventInfo with the given parameters.
      • createJavaEventInfo

        public static JavaEventInfo createJavaEventInfo(java.lang.String className,
                                                        java.lang.String eventId,
                                                        java.lang.Object... args)
        Creates a JavaEventInfo with the given parameters.
        Parameters:
        className - the name of the Java class representing the event to be activated.
        eventId - the event ID number or the final field string that represents the event ID.
        args - any parameters of the event's constructor except for the source and EventID.
        Returns:
        a new instance of JavaEventInfo with the given parameters.