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:
    com.google.gwt.event.shared.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 and Description
    `EventStreamEvent()`
    `EventStreamEvent(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.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.
    `java.lang.Boolean` | `getCtrlKey()` Present for `key events` if the control key was down when the event got triggered.
    `java.lang.Double` | `getDeltaX()` The `horizontal scroll delta`, present for `wheel events`.
    `java.lang.Double` | `getDeltaY()` The `vertiacl scroll delta`, present for `wheel events`.
    `java.lang.Boolean` | `getDragCanceled()` Set on the event captured at the end of a drag if the drag is canceled.
    `java.lang.String` | `getDragTargetClass()` The class name of the `drag target`, present for most `drag events`.
    `java.lang.String` | `getDragTargetID()` The `widget ID` of the `drag target`, present for most `drag events`.
    `java.lang.String` | `getDropTargetClass()` The class name of the `drop target`, present for some `drag events`.
    `java.lang.String` | `getDropTargetID()` The `widget ID` of the `drop target`, present for some `drag events`.
    `java.lang.Boolean` | `getErrorEvent()` Present along with `errorTrace` and `threadCode` if the event triggering the error wasn't already captured, and required adding a new event.
    `java.lang.String` | `getErrorTrace()` The stack reported when a JavaScript error is hit processing an event.
    `java.lang.String` | `getEventType()` The type of the `EventStreamEvent`.
    `java.lang.Integer` | `getHeight()` The `page height`, present for page-level `resize events`.
    `java.lang.String` | `getKeyName()` The name of the key that triggered this event, present for `key events`.
    `java.lang.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.
    `java.lang.String` | `getLocator()` The locator representing the event target, if one exists.
    `java.lang.Boolean` | `getMetaKey()` Present for `key events` if the meta key was down when the event got triggered.
    `static EventStreamEvent` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getOriginalType()` For synthetic events (where the `EventHandler` has (re)dispatched a DOM event as a new type), the original `eventType`.
    `java.lang.Boolean` | `getShiftKey()` Present for `key events` if the shift key was down when the event got triggered.
    `java.lang.Boolean` | `getSynthetic()` True For synthetic events.
    `java.lang.String` | `getTargetClass()` The class name of the event target, if one exists.
    `java.lang.String` | `getTargetID()` The `widget ID` of the event target, if one exists.
    `java.lang.Integer` | `getTargetX()` The horizontal offset of the event from the `left edge` of the event target, if one exists.
    `java.lang.Integer` | `getTargetY()` The vertical offset of the event from the `top edge` of the event target, if one exists.
    `java.lang.String` | `getThreadCode()` A symbolic thead ID useful for debugging, present when a JavaScript error is hit processing an event.
    `java.lang.Integer` | `getTimeOffset()` The time offset of this event from `EventStreamData.startTime`, when capturing started, in milliseconds.
    `java.lang.String` | `getURL()` The transaction `URL` associated wtih the successful `relogin`.
    `java.lang.Integer` | `getWidth()` The `page width`, present for page-level `resize events`.
    `java.lang.Integer` | `getX()` The left offset of the event on the page.
    `java.lang.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 Detail

    - #### EventStreamEvent

          public EventStreamEvent()

    - #### EventStreamEvent

          public EventStreamEvent(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static EventStreamEvent getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### getCount

          public java.lang.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 java.lang.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 java.lang.Double getDeltaX()

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

    - #### getDeltaY

          public java.lang.Double getDeltaY()

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

    - #### getDragCanceled

          public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.Integer getHeight()

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

    - #### getKeyName

          public java.lang.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 java.lang.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()`

    - #### getLocator

          public java.lang.String getLocator()

      The locator representing the event target, if one exists. Designed to be robust, the the locator provides a future-proof way to specify a `Canvas`, `FormItem`, or widget part such as a row of a `ListGrid`.
      Returns:
        Current locator value. Default value is null
      See Also:
        `com.smartgwt.client.util.AutoTest#getObject`, `AutoTestLocator`

    - #### getMetaKey

          public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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`

    - #### getTargetX

          public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.Integer getWidth()

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

    - #### getX

          public java.lang.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 java.lang.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()`