sky.monome.event.button
Interface ButtonManager<B extends ButtonManager<B>>

Type Parameters:
B - Type of button manager that implements this interface.
All Known Implementing Classes:
AbstractRadio.AbstractRadioGroup, LedButtonCouple, Member.Group, OptionalRadio.OptionalRadioGroup, Pad.PadGroup, Pad.PadGroup.Lure, Radio.RadioGroup, SequencerRadio.SequencerRadioGroup

public interface ButtonManager<B extends ButtonManager<B>>

Manager or container of buttons, or button itself. A button manager can have registered listeners to listen to button events.

Author:
PJ Skyman

Method Summary
 void addButtonListener(ButtonListener<B> buttonListener)
          Adds the specified button listener to the list of button listeners.
 void fireButtonActionned(B buttonManager, ButtonEvent.ButtonAction buttonAction)
          Invoked when a button action occurs.
 ButtonListener<B>[] getButtonListeners()
          Returns an array of all button listeners.
 void removeButtonListener(ButtonListener<B> buttonListener)
          Removes the specified button listener from the list of button listeners.
 

Method Detail

addButtonListener


void addButtonListener(ButtonListener<B> buttonListener)
Adds the specified button listener to the list of button listeners.

Parameters:
buttonListener - Button listener to add to the list of button listeners.

removeButtonListener


void removeButtonListener(ButtonListener<B> buttonListener)
Removes the specified button listener from the list of button listeners.

Parameters:
buttonListener - Button listener to remove from the list of button listeners.

getButtonListeners


ButtonListener<B>[] getButtonListeners()
Returns an array of all button listeners.

Returns:
An array of all button listeners.

fireButtonActionned


void fireButtonActionned(B buttonManager,

                         ButtonEvent.ButtonAction buttonAction)
Invoked when a button action occurs.

Parameters:
buttonManager - Button manager that triggered the button event.
buttonAction - Button action that is performed.