|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.behavior.Member.Group<M,G>
M
- Type of member behaviors that this group will contain.G
- Type of group that extends this abstract group.public abstract static class Member.Group<M extends Member<G>,G extends Member.Group<M,G>>
Group of members which is responsible for a common behavior between all associated members.
Field Summary | |
---|---|
protected javax.swing.event.EventListenerList |
eventListenerList
List of all listeners registered with this group. |
protected SynchronizedList<M> |
members
List of all member behaviors associated with this group. |
Constructor Summary | |
---|---|
protected |
Member.Group()
Constructs a group. |
Method Summary | |
---|---|
void |
addButtonListener(ButtonListener<G> buttonListener)
Adds the specified button listener to the list of button listeners. |
protected abstract void |
addMember(M member)
Adds the specified member behavior to the list of associated member behaviors. |
void |
fireButtonActionned(G buttonManager,
ButtonEvent.ButtonAction buttonAction)
Invoked when a button action occurs. |
ButtonListener<G>[] |
getButtonListeners()
Returns an array of all button listeners. |
int |
getMembersNumber()
Returns the number of associated member behaviors. |
protected abstract void |
notify(M member,
ButtonEvent.ButtonAction buttonAction)
Notifies that the specified member behavior is itself notified (the led/button couple notified its behavior). |
void |
removeButtonListener(ButtonListener<G> buttonListener)
Removes the specified button listener from the list of button listeners. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final javax.swing.event.EventListenerList eventListenerList
protected final SynchronizedList<M extends Member<G>> members
Constructor Detail |
---|
protected Member.Group()
Method Detail |
---|
protected abstract void addMember(M member) throws MonomeException
member
- Member behavior to add to the list of associated member behaviors.
MonomeException
- In special cases, when a led state can't be initialized.public int getMembersNumber()
protected abstract void notify(M member, ButtonEvent.ButtonAction buttonAction) throws MonomeException
member
- Member behavior that notifies this group.buttonAction
- Button action associated to this notification.
MonomeException
- When a led state can't be modified.public void addButtonListener(ButtonListener<G> buttonListener)
addButtonListener
in interface ButtonManager<G extends Member.Group<M,G>>
buttonListener
- Button listener to add to the list of button listeners.public void removeButtonListener(ButtonListener<G> buttonListener)
removeButtonListener
in interface ButtonManager<G extends Member.Group<M,G>>
buttonListener
- Button listener to remove from the list of button listeners.public ButtonListener<G>[] getButtonListeners()
getButtonListeners
in interface ButtonManager<G extends Member.Group<M,G>>
public void fireButtonActionned(G buttonManager, ButtonEvent.ButtonAction buttonAction)
fireButtonActionned
in interface ButtonManager<G extends Member.Group<M,G>>
buttonManager
- Button manager that triggered the button event.buttonAction
- Button action that is performed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |