# Class RelativeDragEvent

java.lang.Object
com.sparshui.common.messages.events.RelativeDragEvent

All Implemented Interfaces:
  `Event, Serializable`

public class RelativeDragEvent extends Object implements Event

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`RelativeDragEvent()`
`RelativeDragEvent(byte[] data)`
Constructs a dragEvent from a complete serialized version of the drag event.
`RelativeDragEvent(float changeInX, float changeInY)`

## Method Summary

Modifier and Type
Method
Description
`float`
`getChangeInX()`
`float`
`getChangeInY()`
`int`
`getEventType()`
Returns the integer value of this event type.
`byte[]`
`serialize()`
Constructs the data packet with this event data.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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: `Event`
Returns the integer value of this event type. Event type values are defined in the enumeration com.sparshui.common.messages.events.EventType.java

Specified by:
  `getEventType` in interface `Event`
Returns:
  The event type

### serialize

public byte[] serialize()
Constructs the data packet with this event data. Message format for this event: - 4 bytes : EventType - 4 bytes : changeInX - 4 bytes : changeInY - 12 bytes total

Specified by:
  `serialize` in interface `Event`
Returns:
  serialized data