Package com.hp.lft.sdk.java
Class EventInfoFactory
java.lang.Object
com.hp.lft.sdk.java.EventInfoFactory
A factory for creating EventInfo to be passed to fireEvent methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JavaEventInfo
createJavaEventInfo
(String className, String eventId, Object... args) Creates aJavaEventInfo
with the given parameters.static KeyboardEventInfo
createKeyboardEventInfo
(KeyboardEvent keyboardEvent, long when, int modifiers, int keyCode, char keyChar) Creates aKeyboardEventInfo
with the given parameters.static KeyboardEventInfo
createKeyboardEventInfo
(KeyboardEvent keyboardEvent, long when, int modifiers, int keyCode, char keyChar, int keyLocation) Creates aKeyboardEventInfo
object with the given parameters.static MouseEventInfo
createMouseEventInfo
(MouseEvent mouseEvent, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) Creates aMouseEventInfo
with the given parameters.static MouseEventInfo
createMouseEventInfo
(MouseEvent mouseEvent, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) Creates aMouseEventInfo
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 aMouseEventInfo
with the given parameters.static UiEventInfo
createUiEventInfo
(UiEvent uiEvent) Creates anUiEventInfo
for the given UiEvent.
-
Constructor Details
-
EventInfoFactory
public EventInfoFactory()
-
-
Method Details
-
createUiEventInfo
Creates anUiEventInfo
for the given UiEvent.- Parameters:
uiEvent
- theUiEvent
to create theUiEventInfo
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 aKeyboardEventInfo
object with the given parameters.- Parameters:
keyboardEvent
- theKeyboardEvent
to create theKeyboardEventInfo
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 aKeyboardEventInfo
with the given parameters.- Parameters:
keyboardEvent
- theKeyboardEvent
to create theKeyboardEventInfo
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 aMouseEventInfo
with the given parameters.- Parameters:
mouseEvent
- theMouseEvent
to create theMouseEventInfo
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 aMouseEventInfo
with the given parameters.- Parameters:
mouseEvent
- theMouseEvent
to create theMouseEventInfo
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 aMouseEventInfo
with the given parameters.- Parameters:
mouseEvent
- theMouseEvent
to create theMouseEventInfo
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
Creates aJavaEventInfo
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.
-