# Class FlickEvent

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

All Implemented Interfaces:
  `Event, Serializable`

public class FlickEvent extends Object implements Event

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`FlickEvent()`
`FlickEvent(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 Type
Method
Description
`int`
`getEventType()`
Returns the integer value of this event type.
`float`
`getSpeedLevel()`
`float`
`getXdirection()`
`float`
`getYdirection()`
`byte[]`
`serialize()`
Constructs the data packet with this event data.
`String`
`toString()`

### Methods inherited from class Object

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

## 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: `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

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### serialize

public byte[] serialize()
Constructs the data packet with this event data. Message format for this event: - 4 bytes : EventType - 4 bytes : SpeedLevel - 4 bytes : X Direction - 4 bytes : Y Direction - 16 bytes total

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