|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.Component sky.monome.Container sky.monome.AbstractGroup<LedButtonCouple> sky.monome.LedButtonGroup
public class LedButtonGroup
Group that contains exclusively led/button couples. The led/button couples creation is automatic. All led/button couples will have the same type of behaviors.
Field Summary |
---|
Fields inherited from class sky.monome.AbstractGroup |
---|
components |
Fields inherited from class sky.monome.Container |
---|
height, width |
Fields inherited from class sky.monome.Component |
---|
container, eventListenerList, lockObject, name, x, y |
Constructor Summary | |
---|---|
LedButtonGroup(java.lang.String name,
Container container,
int x,
int y,
int width,
int height,
BehaviorFactory behaviorFactory)
Deprecated. Since SkyMonome v1.2, all components register themselves inside their container, so you don't need to specify the container by calling this constructor. |
|
LedButtonGroup(java.lang.String name,
Container container,
int x,
int y,
int width,
int height,
java.lang.Class<? extends Behavior> behaviorClass,
java.lang.Object... argumentsForBehavior)
Deprecated. Since SkyMonome v1.1, it is preferred to use the LedButtonGroup(String,Container,int,int,int,int,BehaviorFactory) constructor instead of this one. |
|
LedButtonGroup(java.lang.String name,
int x,
int y,
int width,
int height,
BehaviorFactory behaviorFactory)
Constructs a led/button group with the specified name, specified coordinates and dimensions and the specified behavior factory. |
Method Summary | |
---|---|
void |
addLedButtonCouple(LedButtonCouple ledButtonCouple)
Adds the specified led/button couple to the list of contained led/button couples. |
LedButtonCouple |
getLedButtonCouple(int x,
int y)
Returns the led/button couple at specified local coordinates. |
LedButtonCouple[] |
getLedButtonCouples()
Returns an array of all contained led/button couples. |
void |
removeLedButtonCouple(LedButtonCouple ledButtonCouple)
Removes the specified led/button couple from the list of contained led/button couples. |
void |
removeLedButtonCouples()
Removes all led/button couples from the list of the contained led/button couples. |
java.lang.String |
toString()
Returns a string representation of this led/button group. |
Methods inherited from class sky.monome.AbstractGroup |
---|
canHaveParentContainer, getAbsoluteX, getAbsoluteY, getBounds, getMonome, isVisible, notify, writeOn |
Methods inherited from class sky.monome.Container |
---|
getHeight, getWidth |
Methods inherited from class sky.monome.Component |
---|
getContainer, getLockObject, getName, getX, getY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public LedButtonGroup(java.lang.String name, Container container, int x, int y, int width, int height, java.lang.Class<? extends Behavior> behaviorClass, java.lang.Object... argumentsForBehavior) throws MonomeException
LedButtonGroup(String,Container,int,int,int,int,BehaviorFactory)
constructor instead of this one.
name
- Name of this led/button group.container
- Container that contains this led/button group.x
- X-coordinate of this led/button group in the local context of its container.y
- Y-coordinate of this led/button group in the local context of its container.width
- Width of this led/button group.height
- Height of this led/button group.behaviorClass
- Type of behavior to use when creating led/button couples.argumentsForBehavior
- Arguments to use when creating led/button couples.
MonomeException
- When led/button couple creations can't be done, for example when behavior objects can't be created.@Deprecated public LedButtonGroup(java.lang.String name, Container container, int x, int y, int width, int height, BehaviorFactory behaviorFactory) throws MonomeException
name
- Name of this led/button group.container
- Container that contains this led/button group.x
- X-coordinate of this led/button group in the local context of its container.y
- Y-coordinate of this led/button group in the local context of its container.width
- Width of this led/button group.height
- Height of this led/button group.behaviorFactory
- Factory for behaviors that are used to create led/button couples.
MonomeException
- When led/button couple creations can't be done, for example when behavior objects can't be created.public LedButtonGroup(java.lang.String name, int x, int y, int width, int height, BehaviorFactory behaviorFactory) throws MonomeException
name
- Name of this led/button group.x
- X-coordinate of this led/button group in the local context of its container.y
- Y-coordinate of this led/button group in the local context of its container.width
- Width of this led/button group.height
- Height of this led/button group.behaviorFactory
- Factory for behaviors that are used to create led/button couples.
MonomeException
- When led/button couple creations can't be done, for example when behavior objects can't be created.Method Detail |
---|
public java.lang.String toString()
toString
in class Component
public LedButtonCouple[] getLedButtonCouples()
public LedButtonCouple getLedButtonCouple(int x, int y)
x
- X-coordinate of the desired led/button couple.y
- Y-coordinate of the desired led/button couple.
null
is
returned. If there's no led/button couple at specified coordinates,
so null
is also returned.public void addLedButtonCouple(LedButtonCouple ledButtonCouple) throws MonomeException
ledButtonCouple
- Led/button couple to add to the list of contained led/buton couples.
MonomeException
- When the bounds of the specified led/button couple intersects with a previously added led/button couple.public void removeLedButtonCouple(LedButtonCouple ledButtonCouple)
ledButtonCouple
- Led/button couple to remove from the list of the contained led/button couples.public void removeLedButtonCouples()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |