Artenus 2D Framework
Artenus Reference
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 TypeMethod and Description
public ButtonListenergetListener()
Gets the current listener responsible for this button's push and release events.
public booleanisPressed()
Returns a value indicating whether the button is currently in pressed state.
public voidsetListener(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:
listenerThe listener