|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.EventObject
wiiremotej.event.BBEvent
wiiremotej.event.BBButtonEvent
public class BBButtonEvent
Button event for Nintendo (R) Balance Board (TM). Contains information about whether the balance board's button is currently pressed in this event.
| Field Summary |
|---|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
BBButtonEvent(BalanceBoard source,
boolean buttonPressed,
BBButtonEvent lastEvent)
Creates a new BBButtonEvent from the given the given buttonPressed value. |
|
BBButtonEvent(BalanceBoard source,
byte[] data,
BBButtonEvent lastEvent)
Creates a new BBButtonEvent from the given input data array. |
|
| Method Summary | |
|---|---|
boolean |
isPressed()
Returns true if the balance board's button is pressed; otherwise false. |
boolean |
wasPressed()
Returns true if the balance board's button was pressed; otherwise false. |
boolean |
wasReleased()
Returns true if the balance board's button was released; otherwise false. |
| Methods inherited from class wiiremotej.event.BBEvent |
|---|
getSource |
| Methods inherited from class java.util.EventObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BBButtonEvent(BalanceBoard source,
byte[] data,
BBButtonEvent lastEvent)
source - the BalanceBoard triggering this event.data - the byte data to process for button presses.lastEvent - the last button event received. Used to calculate wasPressed and wasReleased information.
public BBButtonEvent(BalanceBoard source,
boolean buttonPressed,
BBButtonEvent lastEvent)
source - the BalanceBoard triggering this event.buttonPressed - true if the button is pressed; otherwise, false.lastEvent - the last button event received. Used to calculate wasPressed and wasReleased information.| Method Detail |
|---|
public boolean isPressed()
true if the balance board's button is pressed; otherwise false.
"isPressed" means that the button is currently depressed; it may have just been depressed this event, or it may have been depressed previously.
true if the balance board's button is pressed; otherwise false.public boolean wasPressed()
true if the balance board's button was pressed; otherwise false. "wasPressed" means that the button was not depressed before,
and was just depressed this event.
true if the balance board's button was pressed; otherwise false.public boolean wasReleased()
true if the balance board's button was released; otherwise false. "wasReleased" means that the button was previously
depressed, and that it was just released this event.
true if the balance board's button was released; otherwise false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||