Share this page

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 Summary

    Constructor and Description
    `EventInfoFactory()`

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `static JavaEventInfo` | `createJavaEventInfo(java.lang.String className, java.lang.String eventId, java.lang.Object... args)` Creates a `JavaEventInfo` with the given parameters.
    `static KeyboardEventInfo` | `createKeyboardEventInfo(KeyboardEvent keyboardEvent, long when, int modifiers, int keyCode, char keyChar)` Creates a `KeyboardEventInfo` with the given parameters.
    `static KeyboardEventInfo` | `createKeyboardEventInfo(KeyboardEvent keyboardEvent, long when, int modifiers, int keyCode, char keyChar, int keyLocation)` Creates a `KeyboardEventInfo` object with the given parameters.
    `static MouseEventInfo` | `createMouseEventInfo(MouseEvent mouseEvent, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)` Creates a `MouseEventInfo` with the given parameters.
    `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.
    `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.
    `static UiEventInfo` | `createUiEventInfo(UiEvent uiEvent)` Creates an `UiEventInfo` for the given UiEvent.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EventInfoFactory

          public EventInfoFactory()

  - ### Method Detail

    - #### createUiEventInfo

          public static UiEventInfo createUiEventInfo(UiEvent uiEvent)

      Creates an `UiEventInfo` for the given UiEvent.
      Parameters:
        `uiEvent` - the `UiEvent` to create the `UiEventInfo` for.
      Returns:
        a new instance of `UiEventInfo`.

    - #### 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.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: