Represents a button. This can be a visual touch button on the screen, a physical button on a
game-pad, or anything else that can produce or simulate press and release events.
public interface Button
Method Summary
Modifier and Type | Method and Description |
---|---|
public ButtonListener | getListener() Gets the current listener responsible for this button's push and release events. |
public boolean | isPressed() Returns a value indicating whether the button is currently in pressed state. |
public void | setListener(ButtonListener listener) Assigns a listener to this button to handle its push and release events. |
Method Detail
getListener |
---|
public ButtonListener getListener() Gets the current listener responsible for this button's push and release events. |
isPressed |
---|
public boolean isPressed() Returns a value indicating whether the button is currently in pressed state. Returns:
true if the button is pressed, false otherwise |
setListener | ||
---|---|---|
public void setListener( ButtonListener listener ) Assigns a listener to this button to handle its push and release events. Parameters:
|