|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsky.monome.Component
sky.monome.LedButtonCouple
sky.monome.behavior.Pad.PadGroup.Lure
protected class Pad.PadGroup.Lure
Virtual led/button couple internally associated with the common behavior of the pad group.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class sky.monome.LedButtonCouple |
|---|
LedButtonCouple.ButtonState, LedButtonCouple.LedState |
| Field Summary |
|---|
| Fields inherited from class sky.monome.LedButtonCouple |
|---|
behavior, buttonState, ledState, ledStateModificationLayer |
| Fields inherited from class sky.monome.Component |
|---|
container, eventListenerList, lockObject, name, x, y |
| Constructor Summary | |
|---|---|
protected |
Pad.PadGroup.Lure(Behavior behavior)
Constructs a "lure" with the specified common behavior. |
| Method Summary | |
|---|---|
void |
addButtonListener(ButtonListener<LedButtonCouple> buttonListener)
Adds the specified listener to the listeners list of this button. |
boolean |
canHaveParentContainer()
Indicates whether this led/button couple can have a parent container in the Monome assembling tree. |
void |
fireButtonActionned(LedButtonCouple buttonManager,
ButtonEvent.ButtonAction buttonAction)
Notifies all the listeners that a new button action occured. |
int |
getAbsoluteX()
Returns the absolute X-coordinate of this led/button couple. |
int |
getAbsoluteY()
Returns the absolute Y-coordinate of this led/button couple. |
java.awt.Rectangle |
getBounds()
Returns the bounds of this led/button couple in the local context of its container. |
ButtonListener<LedButtonCouple>[] |
getButtonListeners()
Returns an array of all listeners contained in the listeners list of this button. |
Container |
getContainer()
Returns the container that contains this component. |
Monome |
getMonome()
Returns the logical Monome device that contains this led/button couple. |
java.lang.String |
getName()
Returns the name of this component. |
int |
getX()
Returns the X-coordinate of this component in the local context of its container. |
int |
getY()
Returns the Y-coordinate of this component in the local context of its container. |
void |
initLedState(boolean ledState)
Initializes the state of this led. |
boolean |
isVisible()
Indicates whether this led/button couple is actually visible. |
void |
notify(OSCMessageDigester messageDigester)
Notifies this led/button couple that a message comes from the Monome device. |
void |
removeButtonListener(ButtonListener<LedButtonCouple> buttonListener)
Removes the specified listener from the listeners list of this button. |
protected void |
setButtonState(LedButtonCouple.ButtonState buttonState)
Modifies the state of this button. |
void |
setLedState(LedButtonCouple.LedState ledState,
boolean mustRefresh)
Modifies the state of this led. |
java.lang.String |
toString()
Returns a string representation of this "lure". |
void |
writeOn(Frame frame)
Writes this led on the specified frame in order to refresh the Monome device. |
| Methods inherited from class sky.monome.LedButtonCouple |
|---|
doClick, getBehavior, getButtonState, getLedState |
| Methods inherited from class sky.monome.Component |
|---|
getLockObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Pad.PadGroup.Lure(Behavior behavior)
throws MonomeException
behavior - Common behavior which will be associated to this "lure".
MonomeException - When this "lure" can't be initialized.| Method Detail |
|---|
public void addButtonListener(ButtonListener<LedButtonCouple> buttonListener)
addButtonListener in interface ButtonManager<LedButtonCouple>addButtonListener in class LedButtonCouplebuttonListener - Listener to add to the listeners list of this button.public boolean canHaveParentContainer()
canHaveParentContainer in class LedButtonCouplefalse.
public void fireButtonActionned(LedButtonCouple buttonManager,
ButtonEvent.ButtonAction buttonAction)
fireButtonActionned in interface ButtonManager<LedButtonCouple>fireButtonActionned in class LedButtonCouplebuttonManager - Button manager that triggered the button event.buttonAction - Button action performed on the specified button manager.public int getAbsoluteX()
getAbsoluteX in class LedButtonCouple0.public int getAbsoluteY()
getAbsoluteY in class LedButtonCouple0.public java.awt.Rectangle getBounds()
getBounds in class LedButtonCouplepublic ButtonListener<LedButtonCouple>[] getButtonListeners()
getButtonListeners in interface ButtonManager<LedButtonCouple>getButtonListeners in class LedButtonCouplepublic Monome getMonome()
null is returned.
getMonome in class LedButtonCouplenull.public void initLedState(boolean ledState)
initLedState in class LedButtonCoupleledState - Initial state to give to this led.public boolean isVisible()
isVisible in class LedButtonCoupletrue, since this object is a "lure" and needs to be always active/visible.
public void notify(OSCMessageDigester messageDigester)
throws MonomeException
notify in class LedButtonCouplemessageDigester - Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.
MonomeException - When a problem has occured when treating the message.
By example, a led/button couple can treat a message by lighting on the led, and lighting on a led is a potentially risked operation.public void removeButtonListener(ButtonListener<LedButtonCouple> buttonListener)
removeButtonListener in interface ButtonManager<LedButtonCouple>removeButtonListener in class LedButtonCouplebuttonListener - Listener to remove from the listeners list of this button.protected void setButtonState(LedButtonCouple.ButtonState buttonState)
setButtonState in class LedButtonCouplebuttonState - state New state of this button, among ButtonState.BUTTON_PUSHED and ButtonState.BUTTON_RELEASED.
public void setLedState(LedButtonCouple.LedState ledState,
boolean mustRefresh)
throws MonomeException
setLedState in class LedButtonCoupleledState - New state to give to this led, among LedState.ON and LedState.OFF.mustRefresh - true if the Monome device must be updated immediately, false otherwise.
This parameter is not used.
MonomeException - When a led state can't be modified.public java.lang.String toString()
toString in class LedButtonCouplepublic void writeOn(Frame frame)
writeOn in class LedButtonCoupleframe - Frame in which this led must write its led state.Monome.refresh()public Container getContainer()
getContainer in class Componentnull.public java.lang.String getName()
getName in class Componentpublic int getX()
getX in class Component0.public int getY()
getY in class Component0.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||