Package com.smartgwt.client.tools.stream

# Class EventStreamEvent

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.tools.stream.EventStreamEvent

All Implemented Interfaces:
  `HasHandlers`

public class EventStreamEvent extends DataClass
Note: this is currently an experimental feature and not covered by normal support guarantees. See `Experimental Features` for more information.
A JavaScript object representing an event captured by a `EventStream`. `EventStreamEvent`s may represent DOM events (wrapped by the `EventHandler`), or other operations such as `relogins` or `Reify` file operations on screens and projects.

An `eventType` should always be present, but not all properties will be present for a given `EventStreamEvent`, since their relevance depends on the `eventType`.

In addition to the instance attributes documented for `EventStreamEvent`, if we're capturing `move events` but not `drag events`, the move event starting a drag will be tagged with the drag start `eventType` as a boolean attribute. So for example,

          dragResizeStart: true

might appear in the `EventStreamEvent` for a `mouseMove`, if it started a drag but we weren't capturing `drag events`.

See Also:
  - `Experimental Features`

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EventStreamEvent()`
  `EventStreamEvent(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `getCount()`
  Contains a count of the number of events (if any) collapsed into this event if collapsing is active, which includes: `move events` `key events` `wheel events` `page events` The count, if present, includes the event itself so it will always be a number greater than or equal to two.
  `Boolean`
  `getCtrlKey()`
  Present for `key events` if the control key was down when the event got triggered.
  `Double`
  `getDeltaX()`
  The `horizontal scroll delta`, present for `wheel events`.
  `Double`
  `getDeltaY()`
  The `vertiacl scroll delta`, present for `wheel events`.
  `Boolean`
  `getDragCanceled()`
  Set on the event captured at the end of a drag if the drag is canceled.
  `String`
  `getDragTargetClass()`
  The class name of the `drag target`, present for most `drag events`.
  `String`
  `getDragTargetID()`
  The `widget ID` of the `drag target`, present for most `drag events`.
  `String`
  `getDropTargetClass()`
  The class name of the `drop target`, present for some `drag events`.
  `String`
  `getDropTargetID()`
  The `widget ID` of the `drop target`, present for some `drag events`.
  `Boolean`
  `getErrorEvent()`
  Present along with `errorTrace` and `threadCode` if the event triggering the error wasn't already captured, and required adding a new event.
  `String`
  `getErrorTrace()`
  The stack reported when a JavaScript error is hit processing an event.
  `String`
  `getEventType()`
  The type of the `EventStreamEvent`.
  `Integer`
  `getHeight()`
  The `page height`, present for page-level `resize events`.
  `String`
  `getKeyName()`
  The name of the key that triggered this event, present for `key events`.
  `String`
  `getKeyNames()`
  When `key event collapsing` is active and other events have been collapsed into this one, contains a string representing the concatenated `keyNames` from the collapsed events.
  `Boolean`
  `getMetaKey()`
  Present for `key events` if the meta key was down when the event got triggered.
  `static EventStreamEvent`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `String`
  `getOriginalType()`
  For synthetic events (where the `EventHandler` has (re)dispatched a DOM event as a new type), the original `eventType`.
  `Boolean`
  `getShiftKey()`
  Present for `key events` if the shift key was down when the event got triggered.
  `Boolean`
  `getSynthetic()`
  True For synthetic events.
  `String`
  `getTargetClass()`
  The class name of the event target, if one exists.
  `String`
  `getTargetID()`
  The `widget ID` of the event target, if one exists.
  `String`
  `getTargetLocator()`
  Provided by EventStream for use outside of UISession.
  `Integer`
  `getTargetX()`
  The horizontal offset of the event from the `left edge` of the event target, if one exists.
  `Integer`
  `getTargetY()`
  The vertical offset of the event from the `top edge` of the event target, if one exists.
  `String`
  `getThreadCode()`
  A symbolic thead ID useful for debugging, present when a JavaScript error is hit processing an event.
  `Integer`
  `getTimeOffset()`
  The time offset of this event from `EventStreamData.startTime`, when capturing started, in milliseconds.
  `String`
  `getURL()`
  The transaction `URL` associated wtih the successful `relogin`.
  `Integer`
  `getWidth()`
  The `page width`, present for page-level `resize events`.
  `Integer`
  `getX()`
  The left offset of the event on the page.
  `Integer`
  `getY()`
  The top offset of the event on the page.

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

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

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

- ## Constructor Details

  - ### EventStreamEvent

    public EventStreamEvent()

  - ### EventStreamEvent

    public EventStreamEvent(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static EventStreamEvent getOrCreateRef(JavaScriptObject jsObj)

  - ### getCount

    public Integer getCount()
    Contains a count of the number of events (if any) collapsed into this event if collapsing is active, which includes:
    - `move events`
    - `key events`
    - `wheel events`
    - `page events`
    The count, if present, includes the event itself so it will always be a number greater than or equal to two.
    Returns:
      Current count value. Default value is null

  - ### getCtrlKey

    public Boolean getCtrlKey()
    Present for `key events` if the control key was down when the event got triggered. Otherwise, not present.
    Returns:
      Current ctrlKey value. Default value is null
    See Also:
      - `getKeyName()`
      - `getShiftKey()`
      - `getMetaKey()`

  - ### getDeltaX

    public Double getDeltaX()
    The `horizontal scroll delta`, present for `wheel events`.
    Returns:
      Current deltaX value. Default value is null
    See Also:
      - `getDeltaY()`

  - ### getDeltaY

    public Double getDeltaY()
    The `vertiacl scroll delta`, present for `wheel events`.
    Returns:
      Current deltaY value. Default value is null
    See Also:
      - `getDeltaX()`

  - ### getDragCanceled

    public Boolean getDragCanceled()
    Set on the event captured at the end of a drag if the drag is canceled. This is normally an event such as `dragStop`, `dragRepositionStop`, `dragResizeStop`, or `dragSelectStop`, but if `drag events` aren't being captured, this property may be set on the `mouseUp` ending the drag.
    Returns:
      Current dragCanceled value. Default value is null

  - ### getDragTargetClass

    public String getDragTargetClass()
    The class name of the `drag target`, present for most `drag events`.

    Note that if drag events are not being captured, it will be populated for the `mouseUp` event terminating the drag.

    Returns:
      Current dragTargetClass value. Default value is null
    See Also:
      - `getDragTargetID()`
      - `getDropTargetID()`
      - `getDropTargetClass()`

  - ### getDragTargetID

    public String getDragTargetID()
    The `widget ID` of the `drag target`, present for most `drag events`.

    Note that if drag events are not being captured, it will be populated for the `mouseUp` event terminating the drag.

    Returns:
      Current dragTargetID value. Default value is null
    See Also:
      - `getDropTargetID()`
      - `getDropTargetClass()`
      - `getDragTargetClass()`
      - `GlobalId`

  - ### getDropTargetClass

    public String getDropTargetClass()
    The class name of the `drop target`, present for some `drag events`.

    Note that if drag events are not being captured, it will be populated for the `mouseUp` event terminating the drag.

    Returns:
      Current dropTargetClass value. Default value is null
    See Also:
      - `getDropTargetID()`
      - `getDragTargetID()`
      - `getDragTargetClass()`

  - ### getDropTargetID

    public String getDropTargetID()
    The `widget ID` of the `drop target`, present for some `drag events`.

    Note that if drag events are not being captured, it will be populated for the `mouseUp` event terminating the drag.

    Returns:
      Current dropTargetID value. Default value is null
    See Also:
      - `getDragTargetID()`
      - `getDragTargetClass()`
      - `getDropTargetClass()`
      - `GlobalId`

  - ### getErrorEvent

    public Boolean getErrorEvent()
    Present along with `errorTrace` and `threadCode` if the event triggering the error wasn't already captured, and required adding a new event. If a stream is configured to `capture event errors`, then through error reporting it may capture `eventType`s not specified by the filters.
    Returns:
      Current errorEvent value. Default value is null
    See Also:
      - `getEventType()`
      - `getErrorTrace()`

  - ### getErrorTrace

    public String getErrorTrace()
    The stack reported when a JavaScript error is hit processing an event. The `errorTrace` contains an initial description of the error, and formatting whitespace and newlines to make the trace readable.
    Returns:
      Current errorTrace value. Default value is null
    See Also:
      - `getThreadCode()`
      - `getErrorEvent()`

  - ### getEventType

    public String getEventType()
    The type of the `EventStreamEvent`. For DOM events, this is just the official `EventHandler` name for the event, such as `mouseDown`. Otherwise, it's unique to `EventStream`, but should reflect what event was captured, such as `fileLoad` or `relogin`.
    Returns:
      Current eventType value. Default value is null

  - ### getHeight

    public Integer getHeight()
    The `page height`, present for page-level `resize events`.
    Returns:
      Current height value. Default value is null
    See Also:
      - `getWidth()`

  - ### getKeyName

    public String getKeyName()
    The name of the key that triggered this event, present for `key events`. For flexibility and ease of conversion to formats such as Selenese, the `keyName` for self-inserting keys (e.g. alphanumerics, "!", "@", etc.) reflects the actual character typed, factoring in the shift key. This aligns with `EventHandler.getKeyEventKey()` rather than `EventHandler.getKey()`, but refer to String for special keys.

    Note that the `keyName` for special keys may be more than one character, such as "Enter", or "Down". For improved `collapsing`, the space key is always reported as the self-inserting key " ", rather than the special key "Space", since we can't collapse special and self-inserting keys into one event.

    Returns:
      Current keyName value. Default value is null
    See Also:
      - `getShiftKey()`
      - `getCtrlKey()`
      - `getMetaKey()`
      - `getKeyNames()`

  - ### getKeyNames

    public String getKeyNames()
    When `key event collapsing` is active and other events have been collapsed into this one, contains a string representing the concatenated `keyNames` from the collapsed events. The length of this string should match `count`, and the first character in the string should be `keyName`.

    Note that only self-inserting keys can be concentated by collapsing, not special keys.

    Returns:
      Current keyNames value. Default value is null
    See Also:
      - `getKeyName()`

  - ### getMetaKey

    public Boolean getMetaKey()
    Present for `key events` if the meta key was down when the event got triggered. Otherwise, not present.
    Returns:
      Current metaKey value. Default value is null
    See Also:
      - `getKeyName()`
      - `getShiftKey()`
      - `getCtrlKey()`

  - ### getOriginalType

    public String getOriginalType()
    For synthetic events (where the `EventHandler` has (re)dispatched a DOM event as a new type), the original `eventType`.
    Returns:
      Current originalType value. Default value is null
    See Also:
      - `getSynthetic()`

  - ### getShiftKey

    public Boolean getShiftKey()
    Present for `key events` if the shift key was down when the event got triggered. Otherwise, not present.
    Returns:
      Current shiftKey value. Default value is null
    See Also:
      - `getKeyName()`
      - `getCtrlKey()`
      - `getMetaKey()`

  - ### getSynthetic

    public Boolean getSynthetic()
    True For synthetic events. Otherwise, not present at all. When true, `originalType` should be set indicating the original `eventType`.
    Returns:
      Current synthetic value. Default value is null
    See Also:
      - `getOriginalType()`

  - ### getTargetClass

    public String getTargetClass()
    The class name of the event target, if one exists. Page-level and non-DOM events may not have any target.
    Returns:
      Current targetClass value. Default value is null
    See Also:
      - `getTargetID()`
      - `getTargetX()`
      - `getTargetY()`

  - ### getTargetID

    public String getTargetID()
    The `widget ID` of the event target, if one exists. Page-level and non-DOM events may not have any target.
    Returns:
      Current targetID value. Default value is null
    See Also:
      - `getTargetClass()`
      - `getTargetX()`
      - `getTargetY()`
      - `GlobalId`

  - ### getTargetLocator

    public String getTargetLocator()
    Provided by EventStream for use outside of UISession. Note: When used outside of a UISession, this locator lacks all of UISession's guarantees about deterministic playback.
    Returns:
      Current targetLocator value. Default value is null
    See Also:
      - `AutoTestLocator`

  - ### getTargetX

    public Integer getTargetX()
    The horizontal offset of the event from the `left edge` of the event target, if one exists. Keyboard, page-level, and non-DOM events may not have any target.
    Returns:
      Current targetX value. Default value is null
    See Also:
      - `getTargetID()`
      - `getTargetClass()`
      - `getTargetY()`

  - ### getTargetY

    public Integer getTargetY()
    The vertical offset of the event from the `top edge` of the event target, if one exists. Keyboard, page-level, and non-DOM events may not have any target.
    Returns:
      Current targetY value. Default value is null
    See Also:
      - `getTargetID()`
      - `getTargetClass()`
      - `getTargetY()`

  - ### getThreadCode

    public String getThreadCode()
    A symbolic thead ID useful for debugging, present when a JavaScript error is hit processing an event.
    Returns:
      Current threadCode value. Default value is null
    See Also:
      - `getErrorTrace()`
      - `getErrorEvent()`

  - ### getTimeOffset

    public Integer getTimeOffset()
    The time offset of this event from `EventStreamData.startTime`, when capturing started, in milliseconds.
    Returns:
      Current timeOffset value. Default value is null

  - ### getURL

    public String getURL()
    The transaction `URL` associated wtih the successful `relogin`. Only present for `login events`.
    Returns:
      Current URL value. Default value is null
    See Also:
      - `URL`

  - ### getWidth

    public Integer getWidth()
    The `page width`, present for page-level `resize events`.
    Returns:
      Current width value. Default value is null
    See Also:
      - `getHeight()`

  - ### getX

    public Integer getX()
    The left offset of the event on the page. This property typically won't be set unless no `target` is present and the event has an `errorTrace`.
    Returns:
      Current X value. Default value is null
    See Also:
      - `getY()`

  - ### getY

    public Integer getY()
    The top offset of the event on the page. This property typically won't be set unless no `target` is present and the event has an `errorTrace`.
    Returns:
      Current Y value. Default value is null
    See Also:
      - `getX()`