Class RelativeDragEvent
java.lang.Object
com.sparshui.common.messages.events.RelativeDragEvent
- All Implemented Interfaces:
Event, Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionRelativeDragEvent(byte[] data) Constructs a dragEvent from a complete serialized version of the drag event.RelativeDragEvent(float changeInX, float changeInY) -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatintReturns the integer value of this event type.byte[]Constructs the data packet with this event data.
-
Constructor Details
-
RelativeDragEvent
public RelativeDragEvent() -
RelativeDragEvent
public RelativeDragEvent(float changeInX, float changeInY) -
RelativeDragEvent
public RelativeDragEvent(byte[] data) Constructs a dragEvent from a complete serialized version of the drag event. - 4 bytes : ChangeInX - 4 bytes : ChangeInY - 8 bytes total- Parameters:
data- The byte array that represents a serialized Drag Event.
-
-
Method Details
-
getChangeInX
public float getChangeInX() -
getChangeInY
public float getChangeInY() -
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
-
serialize
-