|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sky.monome.Component
public abstract class Component
Monome component. This class is the base of all components on a Monome device.
Field Summary | |
---|---|
protected Container |
container
Container which contains this component. |
protected javax.swing.event.EventListenerList |
eventListenerList
List of all listeners registered with this component. |
protected java.lang.Object |
lockObject
Lock object needed for exclusive operations. |
protected java.lang.String |
name
Name of this component. |
protected int |
x
X-coordinate of this component. |
protected int |
y
Y-coordinate of this component. |
Constructor Summary | |
---|---|
Component(java.lang.String name,
Container container,
int x,
int y)
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. |
|
Component(java.lang.String name,
int x,
int y)
Constructs a component with the specified name and specified coordinates. |
Method Summary | |
---|---|
abstract boolean |
canHaveParentContainer()
Indicates whether this component can have a parent container in the Monome assembling tree. |
abstract int |
getAbsoluteX()
Returns the absolute X-coordinate of this component. |
abstract int |
getAbsoluteY()
Returns the absolute Y-coordinate of this component. |
abstract java.awt.Rectangle |
getBounds()
Returns the bounds of this component in the local context of its container. |
Container |
getContainer()
Returns the container that contains this component. |
java.lang.Object |
getLockObject()
Returns the lock object needed for exclusive operations. |
abstract Monome |
getMonome()
Returns the logical Monome device that contains this component. |
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. |
abstract boolean |
isVisible()
Indicates whether this component is actually visible. |
abstract void |
notify(OSCMessageDigester messageDigester)
Notifies this component that a message comes from the Monome device. |
abstract java.lang.String |
toString()
Returns a string representation of this component. |
abstract void |
writeOn(Frame frame)
Writes this component on the specified frame in order to refresh the Monome device. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String name
protected final int x
protected final int y
protected final java.lang.Object lockObject
protected final javax.swing.event.EventListenerList eventListenerList
protected Container container
Constructor Detail |
---|
@Deprecated public Component(java.lang.String name, Container container, int x, int y)
name
- Name of this component.container
- Container that contains this component.x
- X-coordinate of this component in the local context of its container.y
- Y-coordinate of this component in the local context of its container.public Component(java.lang.String name, int x, int y)
name
- Name of this component.x
- X-coordinate of this component in the local context of its container.y
- Y-coordinate of this component in the local context of its container.Method Detail |
---|
public java.lang.String getName()
public int getX()
public int getY()
public java.lang.Object getLockObject()
public Container getContainer()
public abstract void notify(OSCMessageDigester messageDigester) throws MonomeException
messageDigester
- 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 abstract void writeOn(Frame frame) throws MonomeException
set(int,int,LedState)
method of class Frame
for writing their led state,
or call the writeOn(Frame)
method of contained components for the containers,
or do nothing when they haven't any relation with the leds.
frame
- Frame in which this component must write its led state.
MonomeException
- When a problem has occured while getting the led state of this component, or a component inside (for containers).Monome.refresh()
public abstract Monome getMonome()
public abstract int getAbsoluteX()
public abstract int getAbsoluteY()
public abstract boolean isVisible()
true
if this component is actually visible, false
otherwise.public abstract boolean canHaveParentContainer()
true
if this component can have a parent container, false
otherwise.public abstract java.lang.String toString()
toString
in class java.lang.Object
public abstract java.awt.Rectangle getBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |