com.buglabs.device
Class ButtonEvent

java.lang.Object
  extended by com.buglabs.device.ButtonEvent

public class ButtonEvent
extends java.lang.Object

Represents a physical key event.


Field Summary
static int BUTTON_AUDIO
           
static int BUTTON_AUDIO_VOLDOWN_PRESSED_ACTION
           
static int BUTTON_AUDIO_VOLUP_PRESSED_ACTION
           
static int BUTTON_CAMERA_SHUTTER
           
static int BUTTON_CAMERA_ZOOM_IN
           
static int BUTTON_CAMERA_ZOOM_OUT
           
static int BUTTON_DOWN
           
static int BUTTON_HOTKEY_1
           
static int BUTTON_HOTKEY_2
           
static int BUTTON_HOTKEY_3
           
static int BUTTON_HOTKEY_4
           
static int BUTTON_LEFT
           
static int BUTTON_RIGHT
           
static int BUTTON_SELECT
           
static int BUTTON_UP
           
static int KEY_DOWN
           
static int KEY_UP
           
 
Constructor Summary
ButtonEvent(int key)
           
ButtonEvent(int rawValue, float duration)
           
ButtonEvent(int rawValue, float duration, int button)
           
ButtonEvent(int rawValue, float duration, int button, long action)
           
ButtonEvent(int rawValue, float duration, int button, long action, java.lang.String source)
           
 
Method Summary
 long getAction()
           
 int getButton()
           
 float getDuration()
          Deprecated.  
 int getRawValue()
           
 java.lang.String getSource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUTTON_HOTKEY_1

public static final int BUTTON_HOTKEY_1
See Also:
Constant Field Values

BUTTON_HOTKEY_2

public static final int BUTTON_HOTKEY_2
See Also:
Constant Field Values

BUTTON_HOTKEY_3

public static final int BUTTON_HOTKEY_3
See Also:
Constant Field Values

BUTTON_HOTKEY_4

public static final int BUTTON_HOTKEY_4
See Also:
Constant Field Values

BUTTON_LEFT

public static final int BUTTON_LEFT
See Also:
Constant Field Values

BUTTON_RIGHT

public static final int BUTTON_RIGHT
See Also:
Constant Field Values

BUTTON_UP

public static final int BUTTON_UP
See Also:
Constant Field Values

BUTTON_DOWN

public static final int BUTTON_DOWN
See Also:
Constant Field Values

BUTTON_CAMERA_ZOOM_IN

public static final int BUTTON_CAMERA_ZOOM_IN
See Also:
Constant Field Values

BUTTON_CAMERA_ZOOM_OUT

public static final int BUTTON_CAMERA_ZOOM_OUT
See Also:
Constant Field Values

BUTTON_CAMERA_SHUTTER

public static final int BUTTON_CAMERA_SHUTTER
See Also:
Constant Field Values

BUTTON_SELECT

public static final int BUTTON_SELECT
See Also:
Constant Field Values

BUTTON_AUDIO

public static final int BUTTON_AUDIO
See Also:
Constant Field Values

BUTTON_AUDIO_VOLUP_PRESSED_ACTION

public static final int BUTTON_AUDIO_VOLUP_PRESSED_ACTION
See Also:
Constant Field Values

BUTTON_AUDIO_VOLDOWN_PRESSED_ACTION

public static final int BUTTON_AUDIO_VOLDOWN_PRESSED_ACTION
See Also:
Constant Field Values

KEY_DOWN

public static final int KEY_DOWN
See Also:
Constant Field Values

KEY_UP

public static final int KEY_UP
See Also:
Constant Field Values
Constructor Detail

ButtonEvent

public ButtonEvent(int key)

ButtonEvent

public ButtonEvent(int rawValue,
                   float duration)

ButtonEvent

public ButtonEvent(int rawValue,
                   float duration,
                   int button)

ButtonEvent

public ButtonEvent(int rawValue,
                   float duration,
                   int button,
                   long action)

ButtonEvent

public ButtonEvent(int rawValue,
                   float duration,
                   int button,
                   long action,
                   java.lang.String source)
Method Detail

getButton

public int getButton()
Returns:
Code for button pressed.

getDuration

public float getDuration()
Deprecated. 

Returns:
This value is not used. Each button event is discreet.

getRawValue

public int getRawValue()
Returns:
The raw code from the event provider.

getAction

public long getAction()
Returns:

getSource

public java.lang.String getSource()
Returns:
The source of the event.