sky.monome.behavior
Class StaticBehavior

java.lang.Object
  extended by sky.monome.behavior.StaticBehavior
All Implemented Interfaces:
Behavior
Direct Known Subclasses:
FrameGroup.PassiveBehavior, LightOnPush, Member, PassiveBehavior, Toggle

public abstract class StaticBehavior
extends java.lang.Object
implements Behavior

Behavior that has no animation in time. It simply reacts to button pressures.

Author:
PJ Skyman

Field Summary
protected  LedButtonCouple ledButtonCouple
          Registered led/button couple.
 
Constructor Summary
StaticBehavior()
          Constructs a static behavior.
 
Method Summary
 LedButtonCouple getLedButtonCouple()
          Returns the led/button couple registered with this behavior.
 void setLedButtonCouple(LedButtonCouple ledButtonCouple)
          Modifies the led/button couple registered with this behavior.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sky.monome.behavior.Behavior
init, notify
 

Field Detail

ledButtonCouple

protected LedButtonCouple ledButtonCouple
Registered led/button couple.

Constructor Detail

StaticBehavior

public StaticBehavior()
Constructs a static behavior.

Method Detail

getLedButtonCouple

public LedButtonCouple getLedButtonCouple()
Returns the led/button couple registered with this behavior.

Specified by:
getLedButtonCouple in interface Behavior
Returns:
The led/button couple registered with this behavior.

setLedButtonCouple

public void setLedButtonCouple(LedButtonCouple ledButtonCouple)
                        throws MonomeException
Modifies the led/button couple registered with this behavior. Note that the behavior can be registered with only one led/button couple in its whole life. If you attempt to register a second led/button couple, so a MonomeException is raised.

Specified by:
setLedButtonCouple in interface Behavior
Parameters:
ledButtonCouple - New led/button couple to register with this behavior.
Throws:
MonomeException - When this behavior is already registered with a led/button couple when this method is called.