sky.monome
Class FrameGroup

java.lang.Object
  extended by sky.monome.Component
      extended by sky.monome.Container
          extended by sky.monome.AbstractGroup<LedButtonCouple>
              extended by sky.monome.LedButtonGroup
                  extended by sky.monome.FrameGroup

public class FrameGroup
extends LedButtonGroup

Group of leds that shows frames.

Author:
PJ Skyman

Nested Class Summary
static class FrameGroup.PassiveBehavior
          Deprecated. Since SkyMonome v1.1, it is recommended to use the PassiveBehavior class instead of this one.
 
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
FrameGroup(java.lang.String name, Container container, int x, int y, int width, int height)
          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.
FrameGroup(java.lang.String name, Container container, int x, int y, int width, int height, Frame frame)
          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.
FrameGroup(java.lang.String name, int x, int y, int width, int height)
          Constructs a frame group with specified coordinates and dimensions and the specified name.
FrameGroup(java.lang.String name, int x, int y, int width, int height, Frame frame)
          Constructs a frame group with specified coordinates and dimensions, the specified name and showing the specified frame.
 
Method Summary
 void notify(OSCMessageDigester messageDigester)
          Notifies this frame group that a message comes from the Monome device.
 void setFrame(Frame frame)
          Modifies the frame that is shown in this frame group.
 java.lang.String toString()
          Returns a string representation of this frame group.
 
Methods inherited from class sky.monome.LedButtonGroup
addLedButtonCouple, getLedButtonCouple, getLedButtonCouples, removeLedButtonCouple, removeLedButtonCouples
 
Methods inherited from class sky.monome.AbstractGroup
canHaveParentContainer, getAbsoluteX, getAbsoluteY, getBounds, getMonome, isVisible, 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

FrameGroup

@Deprecated
public FrameGroup(java.lang.String name,
                             Container container,
                             int x,
                             int y,
                             int width,
                             int height)
           throws MonomeException
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.

Constructs a frame group with specified coordinates and dimensions, the specified name, and contained by the specified container. An empty frame will be shown, with all leds off.

Parameters:
name - Name of this frame group.
container - Container that contains this frame group.
x - X-coordinate of this frame group in the local context of its container.
y - Y-coordinate of this frame group in the local context of its container.
width - Width of this frame group.
height - Height of this frame group.
Throws:
MonomeException - When led states can't be initialized.

FrameGroup

public FrameGroup(java.lang.String name,
                  int x,
                  int y,
                  int width,
                  int height)
           throws MonomeException
Constructs a frame group with specified coordinates and dimensions and the specified name. An empty frame will be shown, with all leds off.

Parameters:
name - Name of this frame group.
x - X-coordinate of this frame group in the local context of its container.
y - Y-coordinate of this frame group in the local context of its container.
width - Width of this frame group.
height - Height of this frame group.
Throws:
MonomeException - When led states can't be initialized.
Since:
SkyMonome v1.2

FrameGroup

@Deprecated
public FrameGroup(java.lang.String name,
                             Container container,
                             int x,
                             int y,
                             int width,
                             int height,
                             Frame frame)
           throws MonomeException
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.

Constructs a frame group with specified coordinates and dimensions, the specified name, contained by the specified container, and showing the specified frame.

Parameters:
name - Name of this frame group.
container - Container that contains this frame group.
x - X-coordinate of this frame group.
y - Y-coordinate of this frame group.
width - Width of this frame group.
height - Height of this frame group.
frame - Frame that will be shown in this frame group.
Throws:
MonomeException - When led states can't be initialized.

FrameGroup

public FrameGroup(java.lang.String name,
                  int x,
                  int y,
                  int width,
                  int height,
                  Frame frame)
           throws MonomeException
Constructs a frame group with specified coordinates and dimensions, the specified name and showing the specified frame.

Parameters:
name - Name of this frame group.
x - X-coordinate of this frame group.
y - Y-coordinate of this frame group.
width - Width of this frame group.
height - Height of this frame group.
frame - Frame that will be shown in this frame group.
Throws:
MonomeException - When led states can't be initialized.
Since:
SkyMonome v1.2
Method Detail

setFrame

public void setFrame(Frame frame)
              throws MonomeException
Modifies the frame that is shown in this frame group. If the new frame is an instance of DynamicFrame, so a special auto-refreshing listener is added to the frame. If the old frame is an instance of DynamicFrame, so the special auto-refreshing listener that was added is removed from the frame. This kind of auto-refreshing listeners is designed to refresh the Monome device when the frame is internally modified, since it concerns only dynamic frames.

Parameters:
frame - New frame that will replace the old one.
Throws:
MonomeException - When led states can't be modified.

notify

public void notify(OSCMessageDigester messageDigester)
Notifies this frame group that a message comes from the Monome device. A frame group does nothing when it is notified.

Overrides:
notify in class AbstractGroup<LedButtonCouple>
Parameters:
messageDigester - Message digester that prepares and encapsulates the message for an easy access of informations contained in the message.

toString

public java.lang.String toString()
Returns a string representation of this frame group.

Overrides:
toString in class LedButtonGroup
Returns:
A string representation of this frame group.