org.wiigee.event
Class ButtonPressedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.wiigee.event.ActionStartEvent
          extended by org.wiigee.event.ButtonPressedEvent
All Implemented Interfaces:
java.io.Serializable

public class ButtonPressedEvent
extends ActionStartEvent

This Event would be generated if a button on a wiimote has been pressed by user. It contains the source (wiimote) and an integer representation of which button has been pressed. Please note that there exist enumeration constants in the class, so you don't have to use this integer values directly.

See Also:
Serialized Form

Field Summary
static int BUTTON_1
           
static int BUTTON_2
           
static int BUTTON_A
           
static int BUTTON_B
           
static int BUTTON_DOWN
           
static int BUTTON_HOME
           
static int BUTTON_LEFT
           
static int BUTTON_MINUS
           
static int BUTTON_PLUS
           
static int BUTTON_RIGHT
           
static int BUTTON_UP
           
 
Fields inherited from class org.wiigee.event.ActionStartEvent
closegesturebutton, recognitionbutton, trainbutton
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ButtonPressedEvent(Device source, int button)
          Create a WiimoteButtonPressedEvent with the Wiimote source whose Button has been pressed and the integer representation of the button.
 
Method Summary
 int getButton()
           
 
Methods inherited from class org.wiigee.event.ActionStartEvent
isCloseGestureInitEvent, isRecognitionInitEvent, isTrainInitEvent
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUTTON_2

public static final int BUTTON_2
See Also:
Constant Field Values

BUTTON_1

public static final int BUTTON_1
See Also:
Constant Field Values

BUTTON_B

public static final int BUTTON_B
See Also:
Constant Field Values

BUTTON_A

public static final int BUTTON_A
See Also:
Constant Field Values

BUTTON_MINUS

public static final int BUTTON_MINUS
See Also:
Constant Field Values

BUTTON_HOME

public static final int BUTTON_HOME
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_DOWN

public static final int BUTTON_DOWN
See Also:
Constant Field Values

BUTTON_UP

public static final int BUTTON_UP
See Also:
Constant Field Values

BUTTON_PLUS

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

ButtonPressedEvent

public ButtonPressedEvent(Device source,
                          int button)
Create a WiimoteButtonPressedEvent with the Wiimote source whose Button has been pressed and the integer representation of the button.

Parameters:
source -
button -
Method Detail

getButton

public int getButton()