sky.monome.behavior
Class SequencerRadio


java.lang.Object

  extended by sky.monome.behavior.StaticBehavior

      extended by sky.monome.behavior.Member<T>

          extended by sky.monome.behavior.AbstractRadio<SequencerRadio.SequencerRadioGroup>

              extended by sky.monome.behavior.SequencerRadio

All Implemented Interfaces:
Behavior

public class SequencerRadio
extends AbstractRadio<SequencerRadio.SequencerRadioGroup>

Behavior that creates mutual selections/unselections, like radio fields in a form. A SequencerRadio is associated to a SequencerRadioGroup. The SequencerRadioGroup is responsible for ensuring the unity of the selection inside the group, and you have the choice between a Radio and a OptionalRadio attitude with a simple boolean.

Since:
SkyMonome v1.1
Author:
PJ Skyman
See Also:
Radio.RadioGroup, OptionalRadio.OptionalRadioGroup

Nested Class Summary
static class SequencerRadio.SequencerRadioGroup
          Sequencer radio group which is responsible for the permanent exclusivity of the last pressed sequencer radio button.
 
Nested classes/interfaces inherited from class sky.monome.behavior.AbstractRadio
AbstractRadio.AbstractRadioGroup<T extends AbstractRadio<G>,G extends AbstractRadio.AbstractRadioGroup<T,G>>
 
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.AbstractRadio
radioGroup
 
Fields inherited from class sky.monome.behavior.Member
group
 
Fields inherited from class sky.monome.behavior.StaticBehavior
ledButtonCouple
 
Constructor Summary
SequencerRadio(SequencerRadio.SequencerRadioGroup sequencerRadioGroup)
          Constructs a sequencer radio behavior associated to the specified sequencer radio group.
 
Method Summary
 void init()
          Initializes this sequencer radio behavior and the registered led/button couple.
 void notify(ButtonEvent.ButtonAction buttonAction)
          Notifies this sequencer radio behavior that an action on the button is performed.
 
Methods inherited from class sky.monome.behavior.AbstractRadio
getGroup, getRadioGroup, off
 
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

SequencerRadio


public SequencerRadio(SequencerRadio.SequencerRadioGroup sequencerRadioGroup)
Constructs a sequencer radio behavior associated to the specified sequencer radio group.

Parameters:
sequencerRadioGroup - Sequencer radio group that will be associated to this sequencer radio behavior.
Method Detail

notify


public void notify(ButtonEvent.ButtonAction buttonAction)

            throws MonomeException
Notifies this sequencer radio 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 sequencer radio 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.