com.samsung.android.sdk.penremote
Class SpenEvent
- java.lang.Object
-
- com.samsung.android.sdk.penremote.SpenEvent
-
- All Implemented Interfaces:
- android.os.Parcelable
public class SpenEvent extends Object implements android.os.Parcelable
This class represents a Spen event and holds information such as time-stamp and event data. You can refer to the data by casting this as a ButtonEvent or AirMotionEvent class, depending on the device you are monitoring.
-
-
Field Summary
Fields Modifier and Type Field and Description static android.os.Parcelable.Creator<SpenEvent>
CREATOR
static int
TYPE_AIR_MOTION
S Pen event type constant : Air motion.static int
TYPE_BUTTON
S Pen event type constant : Button.
-
Constructor Summary
Constructors Constructor and Description SpenEvent(int valueSize)
Create an SpenEvent.SpenEvent(android.os.Parcel in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
describeContents()
long
getTimeStamp()
returns time in nanosecond at which the event happened.void
setTimeStamp(long time)
set time in nanosecond at which the event happenedvoid
setValue(int index, float value)
set event data into the array.void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
TYPE_BUTTON
public static final int TYPE_BUTTON
S Pen event type constant : Button.- See Also:
- Constant Field Values
-
TYPE_AIR_MOTION
public static final int TYPE_AIR_MOTION
S Pen event type constant : Air motion.- See Also:
- Constant Field Values
-
CREATOR
public static final android.os.Parcelable.Creator<SpenEvent> CREATOR
-
-
Constructor Detail
-
SpenEvent
public SpenEvent(android.os.Parcel in)
-
SpenEvent
public SpenEvent(int valueSize)
Create an SpenEvent.- Parameters:
valueSize
- The length of the array depends on event type is being monitored.- Since:
- 1.0.0
-
-
Method Detail
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
setValue
public void setValue(int index, float value)
set event data into the array.- Parameters:
index
- The data index.value
- S Pen event data.- Since:
- 1.0.0
-
setTimeStamp
public void setTimeStamp(long time)
set time in nanosecond at which the event happened- Parameters:
time
- in nanosecond- Since:
- 1.0.0
-
getTimeStamp
public long getTimeStamp()
returns time in nanosecond at which the event happened.- Returns:
- time in nanosecond at which the event happened
- Since:
- 1.0.0
-
-