|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Behavior
Led behavior. Typically, led behaviors can produce lighting effects like blinking, or more simply can automatize led states when buttons are pressed. Other behaviors can be also integrated in groups of behaviors, in order to do exclusive actions between these behaviors. More generally, a behavior avoids the use of button listeners by controlling directly and more simply led states. A led/button couple is registered with only one behavior, and a behavior is associated with only one led/button couple.
Method Summary | |
---|---|
LedButtonCouple |
getLedButtonCouple()
Returns the led/button couple registered with this behavior. |
void |
init()
Initializes this behavior and the registered led/button couple. |
void |
notify(ButtonEvent.ButtonAction buttonAction)
Notifies this behavior that an action on the button is performed. |
void |
setLedButtonCouple(LedButtonCouple ledButtonCouple)
Modifies the led/button couple registered with this behavior. |
Method Detail |
---|
LedButtonCouple getLedButtonCouple()
void setLedButtonCouple(LedButtonCouple ledButtonCouple) throws MonomeException
MonomeException
is raised.
ledButtonCouple
- New led/button couple to register with this behavior.
MonomeException
- When this behavior is already registered with a led/button couple when this method is called.void notify(ButtonEvent.ButtonAction buttonAction) throws MonomeException
buttonAction
- Button action that is performed.
MonomeException
- Only with a few behaviors, when a led state can't be modified, by example.void init() throws MonomeException
MonomeException
- When the initialization of this behavior and the registered led/button couple was not possible.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |