|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--josx.platform.rcx.Button
Abstraction for an RCX button. Example:
Button.RUN.waitForPressAndRelease();
Sound.playTone (1000, 1);
Field Summary | |
static Button[] |
BUTTONS
Array containing VIEW, PRGM and RUN, in that order. |
static Button |
PRGM
The Prgm button. |
static Button |
RUN
The Run button. |
static Button |
VIEW
The View button. |
Method Summary | |
void |
addButtonListener(ButtonListener aListener)
Adds a listener of button events. |
int |
getId()
Return the ID of the button. |
boolean |
isPressed()
|
static int |
readButtons()
Low-level API that reads status of buttons. |
void |
waitForPressAndRelease()
Wait until the button is released. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
public static final Button RUN
public static final Button VIEW
public static final Button PRGM
public static final Button[] BUTTONS
Method Detail |
public final int getId()
public final boolean isPressed()
true
if button is pressed, false
otherwise.public final void waitForPressAndRelease() throws InterruptedException
public void addButtonListener(ButtonListener aListener)
public static int readButtons()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |