|
||||||||||
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<Component> sky.monome.Group sky.monome.Monome
public final class Monome
Logical Monome device. Instances of this class must be always on top of Monome assembling trees. Due to its logical nature, only one instance of this class can manage up to 4 physical 40h Monome devices at the same time, with a correct mapping done in MonomeSerial.
Nested Class Summary | |
---|---|
static class |
Monome.MonomeSize
Monome size. |
Field Summary | |
---|---|
static int |
COORDINATE_NOT_FOUND
Deprecated. Since SkyMonome v1.3, this constant field is not used anymore. |
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 | |
---|---|
Monome(java.lang.String name,
Monome.MonomeSize monomeSize,
java.lang.String address,
java.lang.String prefix,
int portInNumber,
int portOutNumber)
Constructs a logical Monome device with specified name, size, network addressing and prefix. |
Method Summary | |
---|---|
boolean |
canHaveParentContainer()
Returns false . |
void |
clear()
Clears the led state of all leds of the Monome device. |
void |
clear(boolean state)
Clears the led state of all leds of the Monome device. |
int |
getAbsoluteX()
Returns 0 . |
int |
getAbsoluteY()
Returns 0 . |
Monome |
getMonome()
Returns this . |
boolean |
isVisible()
Returns true . |
static void |
main(java.lang.String[] args)
Main method. |
void |
refresh()
Refreshes the physical Monome device according to this logical Monome device. |
static void |
throwException()
Throws an exception and prints the stack trace. |
java.lang.String |
toString()
Returns a string representation of this logical Monome device. |
Methods inherited from class sky.monome.Group |
---|
addComponent, getComponents, removeComponent, removeComponents |
Methods inherited from class sky.monome.AbstractGroup |
---|
getBounds, 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 |
Field Detail |
---|
@Deprecated public static final int COORDINATE_NOT_FOUND
Constructor Detail |
---|
public Monome(java.lang.String name, Monome.MonomeSize monomeSize, java.lang.String address, java.lang.String prefix, int portInNumber, int portOutNumber) throws MonomeException
name
- Name of this Monome device.monomeSize
- Size of this Monome device.address
- Network address of this Monome device, typically "localhost".prefix
- Prefix of this Monome device. Prefix is used by MonomeSerial. Typically "/40h".portInNumber
- Port number for entering communication, typically 8000.portOutNumber
- Port number for outgoing communication, typically 8080.
MonomeException
- When it's impossible to create network connections with MonomeSerial.Method Detail |
---|
public Monome getMonome()
this
.
getMonome
in class AbstractGroup<Component>
this
.public int getAbsoluteX()
0
.
getAbsoluteX
in class AbstractGroup<Component>
0
.public int getAbsoluteY()
0
.
getAbsoluteY
in class AbstractGroup<Component>
0
.public java.lang.String toString()
toString
in class Group
public boolean isVisible()
true
.
isVisible
in class AbstractGroup<Component>
true
.public boolean canHaveParentContainer()
false
.
canHaveParentContainer
in class AbstractGroup<Component>
false
.public void refresh() throws MonomeException
DefaultFrame
.
This logicial Monome device asks to its contained components to write down to the DefaultFrame,
and then the virtual "image" represented by the DefaultFrame is sent in one shot to the physical Monome device.
MonomeException
- When an error appears when communicating with MonomeSerial.public void clear() throws MonomeException
MonomeException
- When an error appears when communicating with MonomeSerial.public void clear(boolean state) throws MonomeException
state
- true
if all leds should be turned on, or false
if all leds should turned off.
MonomeException
- When an error appears when communicating with MonomeSerial.public static void throwException()
public static void main(java.lang.String[] args)
args
- Arguments passed to the program.
They won't be used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |