|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcbox.hw.Button
public class Button
Abstraction for an C-Box button. Example:
Button.RED.waitForPress();
| Field Summary | |
|---|---|
static Button |
BLUE
The Enter button. |
static int |
BLUE_BUTTON
The Enter button value. |
static Button[] |
BUTTONS
Array containing ENTER, LEFT, RIGHT, ESCAPE, in that order. |
static Button |
LEFT
The Left button. |
static int |
LEFT_BUTTON
The Left button value. |
static Button |
RED
The Escape button. |
static int |
RED_BUTTON
The Escape button value. |
static Button |
RIGHT
The Right button. |
static int |
RIGHT_BUTTON
The Right button value. |
| Method Summary | |
|---|---|
int |
getId()
Return the ID of the button. |
boolean |
isPressed()
Check if the button is pressed. |
static int |
readButtons()
Low-level API that reads status of buttons. |
static int |
waitForPress()
wait for some button to be pressed |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
| Field Detail |
|---|
public static final int BLUE_BUTTON
public static final int LEFT_BUTTON
public static final int RIGHT_BUTTON
public static final int RED_BUTTON
public static final Button BLUE
public static final Button LEFT
public static final Button RIGHT
public static final Button RED
public static final Button[] BUTTONS
| Method Detail |
|---|
public final int getId()
public final boolean isPressed()
true if button is pressed, false otherwise.public static int waitForPress()
public static int readButtons()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||