org.openintents.hardware
Class SensorEvent

java.lang.Object
  extended by org.openintents.hardware.SensorEvent

public class SensorEvent
extends java.lang.Object

Object used to report sensor events.

Author:
Peli

Field Summary
static int ACTION_MOVE
          Indicates scrolling behavior.
static int ACTION_SHAKE
          Indicates shaking.
static int ACTION_VOID
          No action.
 
Method Summary
 int getAction()
          Return the kind of action being performed
 long getEventTime()
          Returns the time (in ms) when this specific event was generated.
 float getX()
          Returns the X coordinate of this event.
 float getY()
          Returns the Y coordinate of this event.
 void setAction(int action)
          Sets this event's action.
 void setLocation(float x, float y)
          Set this event's location.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_VOID

public static final int ACTION_VOID
No action.

See Also:
Constant Field Values

ACTION_MOVE

public static final int ACTION_MOVE
Indicates scrolling behavior.

See Also:
Constant Field Values

ACTION_SHAKE

public static final int ACTION_SHAKE
Indicates shaking.

See Also:
Constant Field Values
Method Detail

getAction

public final int getAction()
Return the kind of action being performed


getEventTime

public final long getEventTime()
Returns the time (in ms) when this specific event was generated.


getX

public final float getX()
Returns the X coordinate of this event.


getY

public final float getY()
Returns the Y coordinate of this event.


setAction

public final void setAction(int action)
Sets this event's action.

Parameters:
action -

setLocation

public final void setLocation(float x,
                              float y)
Set this event's location.

Parameters:
x -
y -