public class TouchEvent extends RPCStruct
For touchscreen interactions, the mode of how the choices are presented.
Parameter List
| Name | Type | Description | Reg. | Notes | Version |
|---|---|---|---|---|---|
| id | Integer | A touch's unique identifier. The application can track the current touch events by id. If a touch event has type begin, the id should be added to the set of touches. If a touch event has type end, the id should be removed from the set of touches. | N | Min Value: 0; Max Value: 9 | SmartDeviceLink 3.0 |
| ts | Float | The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds. The timestamp is used to determined the rate of change of position of a touch. The application also uses the time to verify whether two touches,with different ids, are part of a single action by the user. If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array. |
Y | minvalue="0" maxvalue="5000000000" minsize="1" maxsize="1000" | SmartDeviceLink 3.0 |
| c | Integer | The coordinates of the screen area where the touch event occurred. | Y | SmartDeviceLink 3.0 |
SoftButtonCapabilities,
ButtonCapabilities,
OnButtonPress| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_C |
static String |
KEY_ID |
static String |
KEY_TS |
KEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
TouchEvent() |
TouchEvent(Hashtable<String,Object> hash)
Constructs a new TouchEvent object indicated by the Hashtable parameter
|
TouchEvent(Integer id,
List<Long> ts,
List<TouchCoord> c)
Constructs a new TouchEvent object
|
| Modifier and Type | Method and Description |
|---|---|
List<TouchCoord> |
getC()
Deprecated.
in 4.0.2. Use
getTouchCoordinates() instead. |
Integer |
getId() |
List<Long> |
getTimestamps() |
List<TouchCoord> |
getTouchCoordinates() |
List<Long> |
getTs()
Deprecated.
in 4.0.2. Use
getTimestamps()()} instead. |
TouchEvent |
setC(List<TouchCoord> c)
Deprecated.
in 4.0.2. Use
setTouchCoordinates(List) instead. |
TouchEvent |
setId(Integer id) |
TouchEvent |
setTimestamps(List<Long> ts) |
TouchEvent |
setTouchCoordinates(List<TouchCoord> c) |
TouchEvent |
setTs(List<Long> ts)
Deprecated.
in 4.0.2. Use
setTimestamps(List) instead. |
clone, deserializeJSON, equals, format, formatObject, getBoolean, getBulkData, getDouble, getFloat, getInteger, getLong, getMessageTypeName, getObject, getStore, getStoreValue, getString, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_ID
public static final String KEY_TS
public static final String KEY_C
public TouchEvent()
public TouchEvent(Hashtable<String,Object> hash)
Constructs a new TouchEvent object indicated by the Hashtable parameter
hash - The Hashtable to usepublic TouchEvent(@NonNull
Integer id,
@NonNull
List<Long> ts,
@NonNull
List<TouchCoord> c)
id - A touch's unique identifier.ts - The time that the touch was recorded.c - The coordinates of the screen area where the touch event occurred.public TouchEvent setId(@NonNull Integer id)
public Integer getId()
@Deprecated public List<Long> getTs()
getTimestamps()()} instead.public TouchEvent setTimestamps(@NonNull List<Long> ts)
@Deprecated public TouchEvent setTs(List<Long> ts)
setTimestamps(List) instead.ts - @Deprecated public List<TouchCoord> getC()
getTouchCoordinates() instead.public List<TouchCoord> getTouchCoordinates()
@Deprecated public TouchEvent setC(List<TouchCoord> c)
setTouchCoordinates(List) instead.public TouchEvent setTouchCoordinates(@NonNull List<TouchCoord> c)