sky.monome.behavior
Class Pad


java.lang.Object

  extended by sky.monome.behavior.StaticBehavior

      extended by sky.monome.behavior.Member<Pad.PadGroup>

          extended by sky.monome.behavior.Pad

All Implemented Interfaces:
Behavior

public class Pad
extends Member<Pad.PadGroup>

Pad behavior. A pad can be included in a pad group. With pads, you can build synchronized led/button couples. It is possible to specify the behavior that the group will adopt with the set of all associated pads.

Since:
SkyMonome v1.1
Author:
PJ Skyman

Nested Class Summary
static class Pad.PadGroup
          Group of pads which is responsible for the synchronization between all associated pads.
 
Nested classes/interfaces inherited from class sky.monome.behavior.Member
Member.Group<M extends Member<G>,G extends Member.Group<M,G>>
 
Field Summary
 
Fields inherited from class sky.monome.behavior.Member
group
 
Fields inherited from class sky.monome.behavior.StaticBehavior
ledButtonCouple
 
Constructor Summary
Pad(Pad.PadGroup padGroup)
          Constructs a pad that is associated to the specified pad group.
 
Method Summary
 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.
 
Methods inherited from class sky.monome.behavior.Member
getGroup
 
Methods inherited from class sky.monome.behavior.StaticBehavior
getLedButtonCouple, setLedButtonCouple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pad


public Pad(Pad.PadGroup padGroup)
Constructs a pad that is associated to the specified pad group.

Parameters:
padGroup - Pad group that will be associated to this pad behavior.
Method Detail

notify


public void notify(ButtonEvent.ButtonAction buttonAction)

            throws MonomeException
Notifies this behavior that an action on the button is performed.

Parameters:
buttonAction - Button action that is performed.
Throws:
MonomeException - When a led state can't be modified.

init


public void init()

          throws MonomeException
Initializes this behavior and the registered led/button couple. Only led/button couples should call this method, and should call it only one time.

Throws:
MonomeException - When the initialization of this behavior and the registered led/button couple was not possible.