Class FlickEvent
java.lang.Object
com.sparshui.common.messages.events.FlickEvent
- All Implemented Interfaces:
Event, Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionFlickEvent(byte[] data) Constructs a flickEvent from a complete serialized version of the drag event.FlickEvent(float absx, float absy) FlickEvent(int _speedLevel, int _xDirection, int _yDirection) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the integer value of this event type.floatfloatfloatbyte[]Constructs the data packet with this event data.toString()
-
Constructor Details
-
FlickEvent
public FlickEvent() -
FlickEvent
public FlickEvent(float absx, float absy) - Parameters:
absx-absy-
-
FlickEvent
public FlickEvent(int _speedLevel, int _xDirection, int _yDirection) -
FlickEvent
public FlickEvent(byte[] data) Constructs a flickEvent from a complete serialized version of the drag event. - 4 bytes : dx - 4 bytes : dy - 8 bytes total- Parameters:
data- The byte array that represents a serialized Drag Event.
-
-
Method Details
-
getSpeedLevel
public float getSpeedLevel() -
getXdirection
public float getXdirection() -
getYdirection
public float getYdirection() -
getEventType
public int getEventType()Description copied from interface:EventReturns the integer value of this event type. Event type values are defined in the enumeration com.sparshui.common.messages.events.EventType.java- Specified by:
getEventTypein interfaceEvent- Returns:
- The event type
-
toString
-
serialize
-